var ns=(document.layers);
var ie=(document.all);
var w3=(document.getElementById && !ie);


function initHideField1(){
	if(!ns && !ie && !w3) return;
	if(ie)		hideField1Div=eval('document.all.hideDivField1.style');
	else if(ns)	hideField1Div=eval('document.layers["hideDivField1"]');
	else if(w3)	hideField1Div=eval('document.getElementById("hideDivField1").style');
        
		if (ie||w3)
        hideField1Div.visibility ="hidden";
        else
        hideField1Div.visibility ="hide";
}

function showField1(){
	if (ie||w3)
	hideField1Div.visibility="visible";
	else
	hideField1Div.visibility ="show";
}

startList = function() {
	navRoot = document.getElementById("dmenu");		
	if (document.getElementById("hideDivField1") == null){
		for (i=0; i < navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
					//hide the dropdown only if the first menu item					
				}			
				
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");					
				}
			}
		}
	}else {
		for (i=0; i < navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
					//hide the dropdown only if the first menu item
					if(this.id == "hideUl"){
						initHideField1();
					}
				}			
				
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
					if(this.id == "hideUl"){
						showField1();
					}		
				}
			}
		}
	}
}

window.onload=startList;