function startListNavi (element) {
	if (document.all && document.getElementById) {
		navRoot = document.getElementById(element);
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
					//this.zIndex+=1;
  				}
  				node.onmouseout=function() {
  					this.className=this.className.replace(" over", "");
   				}
   			}
  		}
 	}
}
function startListNavi2 (element) {
	var currentNode;
	if (document.getElementById) {
		navRoot = document.getElementById(element);
		for (j=0; j<navRoot.childNodes.length; j++) {
			// current
			nodes = navRoot.childNodes[j];
			if (nodes.nodeName=="LI" && nodes.className=="current") {
				currentNode = nodes;break;
			}			
		}
		//alert("NODE: "+currentNode);
		for (i=0; i<navRoot.childNodes.length; i++) {			
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				if(node.className!="current"){
					node.onmouseover=function() {
						this.className=this.className.replace(" over", "");
						this.className+=" over";
						this.zIndex=this.zIndex+1;
						if(currentNode!= undefined){
							currentNode.className=currentNode.className.replace("over","");
							currentNode.className=currentNode.className.replace("current","");
						}
						//alert(currentNode.className);
	  				}
	  				node.onmouseout=function() {
	  					this.className=this.className.replace("over", "");
	  					if(currentNode!= undefined){
	  						currentNode.className=currentNode.className.replace("over","");
							currentNode.className=currentNode.className.replace("current","");
	  						currentNode.className=" over";
	  					}
	  					//alert(currentNode.className);
	   				}
				}
   			}
  		}
 	}
}


window.onload=function(){
	startListNavi ('hauptnav');
	startListNavi2 ('metanavi');
};
