startList = function() {
	
	if (document.all && document.getElementById) {
	
	navRoot 	= document.getElementById("nav").childNodes[0];
						
		for (i=0; i< navRoot.childNodes.length; i++) {
		
			node = navRoot.childNodes[i];
					
			if (node.nodeName=="LI") {
				
				node.onmouseover=function() {
					//this.className+=" over";
					if (activeNode) activeNode.className = '';
					this.className+= " over";
				}
			
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
					if (activeNode) activeNode.className += ' on' ;
				}
				
			}
			
		}
		
	}
	
}

var activeNode = null;
//window.onload = startList;



/*

startList = function() {
	
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		console.log(navRoot);
		// search active item
		var liItems = document.getElementsByTagName('LI');
		for(var j = 0; j < liItems.length; j++) {
			if (liItems[j].className.indexOf('on') > -1) {
				activeNode = liItems[j];
			}
		}
		
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					if (activeNode) activeNode.className='';
					this.className+=" over";					
	 			}
				node.onmouseout=function() {
					this.className=this.className.replace
					(" over", "");
					if (activeNode) activeNode.className += ' on' ;
			 	}
	 		}
		 }
	 }
}
*/
/*
var activeNode = null;
window.onload = startList;
*/
