// JavaScript Document

function initMenu(){
	if(document.all && document.getElementById) setLIAction(document.getElementById('mainmenu'));
}

function setULAction(el){
	for(var i=0; i<el.childNodes.length; i++) if(el.childNodes[i].nodeName == 'UL') setLIAction(el.childNodes[i]);
}

function setLIAction(el){
	for(var i=0; i<el.childNodes.length; i++){
		if(el.childNodes[i].nodeName == 'LI'){
			el.childNodes[i].onmouseover = function(){ this.className += ' over'; }
			el.childNodes[i].onmouseout = function(){ this.className = this.className.replace(' over', ''); }
			setULAction(el.childNodes[i]);
		}
	}
}


function initMenu2(){
	if(document.all && document.getElementById){
		navRoot = document.getElementById('sidenav');
		for(var i=0; i<navRoot.childNodes.length; i++){
			var node = navRoot.childNodes[i];
			if(node.nodeName == 'LI'){
				node.onmouseover = function(){ this.className += ' over'; }
				node.onmouseout = function(){ this.className = this.className.replace(' over', ''); }
			}
		}
	}
}
