/* NOTA BENE: questo javascript funziona solo con i browser della famiglia IE
l'effetto del menu a tendina con firefox è ottenuto esclusivamente tramite css
*/

function startList() {
	if (document.all&&document.getElementById) {
		navRoot=document.getElementById("nav");
		for(var i=0;i<navRoot.childNodes.length;i++){
			node=navRoot.childNodes[i];
			if(node.tagName=="LI"){
				node.onmouseover=function(){
					this.className+=" over";
					window.event.cancelBubble = true;
					for(var i=0;i<this.childNodes.length;i++){
						if(this.childNodes[i].tagName=="UL"){
						this.childNodes[i].style.display = "block";
						}
					}
				}
				node.onmouseout=function(){
					this.className=this.className.replace(" over", "");
					/* for(var onto=window.event.toElement;onto!=null;onto=onto.parentElement){
					if(onto==this){ window.event.cancelBubble=true; return; }
					} */
					for(var i=0;i<this.childNodes.length;i++){
						if(this.childNodes[i].tagName=="UL"){
							this.childNodes[i].style.display = "none";
						}
					}
				}
			}	
		}
	}
}

window.onload= function(){
  startList();
}

