/* Funktionen zur Objektsteuerung*/
// "MouseOver" Effekt in den DropDown - Menues
function mouseOverHandler (elemID, state) {
	//document.getElementById(arguments[0]).className = (arguments[1] == 1)  ? "bildAn" : "bildAus" ; 
	document.getElementById(arguments[0]).className = (arguments[1] == 1)  ? "bildAn" : "bildAus" ; 
}
function showMenue( nrMenu ) {
	for ( var layer in aL2Menu ) {
		if( aL2Menu[layer].id != nrMenu ) {aL2Menu[layer].setOff();}
	}
	if ( aL2Menu[nrMenu] ) {aL2Menu[nrMenu].setOn(); }
}
function closeMenue( nrMenu ) {
	if ( aL2Menu[nrMenu] ) {aL2Menu[nrMenu].startTimer(); }
}
function setTimer( nrMenu ) {
	if ( aL2Menu[nrMenu] ) {aL2Menu[nrMenu].startTimer( nrMenu ); }
}
function killTimer( nrMenu ) {
	if ( aL2Menu[nrMenu] ) {aL2Menu[nrMenu].resetTimer( nrMenu ); }
}
/* Anfang - Menuklasse */
function menuLayer( id ) {
	// Membervariablen
	this.id = id;
	this.layerObject = document.getElementById("L"+id);
	this.liObject = document.getElementById("li_"+id);
	this.dTimer = 0;	// Ausschalt Timer für Menu
	this.isActive = (this.liObject.className == "hover");
	this.startTimer = startTimer;
	this.resetTimer = resetTimer;
	
	// Funktionen
	this.startTimer = startTimer;
	this.resetTimer = resetTimer;
	this.setOn = setOn;
	this.setOff = setOff;
	
	return this;
}
function setOn() {	
	this.resetTimer();
	if ( this.liObject.className != "active" ) {
		this.liObject.className = "hover";
	};
	this.layerObject.style.visibility = "visible";
}
function setOff() {
	if ( this.liObject.className != "active" ) {
		if( ! this.isActive)  { this.liObject.className = "normal"; }
	};
	this.layerObject.style.visibility = "hidden";
}
function startTimer() {
	this.resetTimer();
	this.dTimer = window.setTimeout( "aL2Menu['" + this.id + "'].setOff()", dAbsTimer);
}
function resetTimer() {
	if ( this.dTimer ) { window.clearTimeout(this.dTimer); }
}
/* Ende - Menuklasse */

