function topmenuClear() {
	var navRoot = document.getElementById("topmenu");
		for (var i=0; i<navRoot.childNodes.length; i++) {
			var node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
			  
          node.className=node.className.replace("over", "");
          //node.className+=" fade";
				  node.childNodes[0].className="";

				
			}
		}
		if (currentID && currentID != "") {
			//document.getElementById(currentID).className = "current";
			cob=document.getElementById(currentID);
			cob.className+=" over";
			cob.childNodes[0].className="over";
       
		}
}

function topmenuHover() {
var i, j, node;
	if(document.getElementById("topmenu")) {
		var navRoot = document.getElementById("topmenu");
		for (j=0; j<navRoot.childNodes.length; j++) {
			if (navRoot.childNodes[j].className && navRoot.childNodes[j].className.search('current') != -1) {
			currentID = navRoot.childNodes[j].id;
			cob=document.getElementById(currentID);
			 cob.className+=" over";
			 cob.childNodes[0].className="over";
			}
		}
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					clearTimeout(navTimer); topmenuClear();
					this.className=this.className.replace("fade",""); 	
					this.className+=" over";
					this.childNodes[0].className="over"; 
					if (currentID && currentID != "" && currentID != this.id) {
						//document.getElementById(currentID).className="current fade";
						cob=document.getElementById(currentID);
      	
      			 cob.className="";
      			 cob.childNodes[0].className="";
					}
				};
				node.onmouseout=function() {
					navTimer = setTimeout(topmenuClear,2000);
				};
			}
		}
	}
}

/* ################ End Top Nav ################ */

/* ################ Loader ################ */
function menu_init() {
	topmenuHover(); 
}

/* for other browsers */
//window.onload = menu_init;
