// Ausklappbare Hauptnavigation anzeigen.

sfHover = function() {
	var sfEls = document.getElementById("style_navigation").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

// Nächste / vorherige Termine auf der Startseite laden.

var start_events_cnt = 0;

function doLoadEvents(type) {

	if (type == 'prev') {
	  start_events_cnt -= 1;
	} else {
	  start_events_cnt += 1;
	}
	
	if (start_events_cnt < 0) {
	  start_events_cnt = 0;
	}

  var timestamp = new Date();
	new Ajax.Updater('layout_start_events', '/index.php?file=forms_termine&mode=start&form[start]=' + start_events_cnt + '&time=' + timestamp.getTime() + '&clean=yes');

}
