//JavaScript code developed by Luca Reghellin - email@reghellin.com//versione: 1.2//settato per sottomenu giffati e che restano aperti e accesi nella sezione relativa//necessita di utilities.js per le rilevazioni di ambientivar activeMenu, activeOpener, lockedButton, lockedMenu = null;var timer;/* UTILITIES *///b:stringa = id pulsante//m:stringa = id menu//level2:numero = indice pulsante livello 2 function setLockedButton(b,m,level2){	lockedButton=document.getElementById(b);	lockedButton.style.backgroundPosition = "0px -20px";		if(m != null){		lockedMenu=document.getElementById(m);		lockedMenu.style.display = "block";		var nodo = (br.expWin)?0:1;		var lvl2 = document.getElementById(m).childNodes[nodo].childNodes[level2].firstChild;		lvl2.style.backgroundPosition = "0px -18px";	}}/* MAIN */function Menu(buttonId,menuId){	this.button = (br.strd)?document.getElementById(buttonId):null;		if(menuId != null){		this.menuStyle = (br.strd)?document.getElementById(menuId).style:null;		this.button.menuStyle = this.menuStyle;		//this.menuStyle.visibility = "hidden";		this.menuStyle.display = "none";		this.button.obj=menuId+"funk";		eval(this.button.obj+"=this.button");	}		else{ this.menuStyle = null; }			this.button.hide = function(){				if(activeMenu){ activeMenu.display="none";  activeMenu=null; }		if(activeOpener){ activeOpener.style.backgroundPosition = "0 0"; activeOpener=null; }				if(lockedButton){			lockedButton.style.backgroundPosition = "0 -20px";			if(lockedMenu != null){ lockedMenu.style.display = "block"; }			activeOpener = null;			activeMenu = null;		}	}			this.button.timerShow=function(){		clearTimeout(timer);				this.menuStyle.display = "block";		this.style.backgroundPosition = "0 -20px";		activeMenu = this.menuStyle; activeOpener = this;		//alert(typeof activeOpener);		timer = setTimeout(this.obj+".hide()",8000);	}	this.button.onclick = function(){		if(menuId != null){						if(this.menuStyle.display == "none"){				this.timerShow();				if(this != lockedButton){					if(lockedMenu != null){						lockedButton.style.backgroundPosition = "0 0";						lockedMenu.style.display = "none"; 						}				}			}			else{ this.hide(); if(timer != 'undefined'){ clearTimeout(timer); } }						return false;		}	}		this.button.onmouseover = function(){		this.style.backgroundPosition = "0 -20px";				if(activeOpener){			if(activeOpener.style != this.style){				activeOpener.style.backgroundPosition = "0 0";			}		}				if(activeMenu){  			activeMenu.display="none";			if(menuId != null){				this.timerShow(); 			}		}	}		////		this.button.onmouseout = function(){		if((activeOpener != this) && (lockedButton != this)){			this.style.backgroundPosition="0 0";		}	}	}function init(){	for(var i=0; i<init.arguments.length; i+=3){		eval(init.arguments[i]+'=new Menu(init.arguments[i+1],init.arguments[i+2])');	}}
