startList = function() {
	if (document.all && document.getElementById) {
		navRoot = document.getElementById("mainlevel");
		
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			
			// Mainlevel li's
			if (node.nodeName == "LI") {

				// Sublevel ul's
				// Check the childs of the UL's inside this LI as well.
				for(j=0; j < node.childNodes.length; j++){
					inNode = node.childNodes[j];
					
					// that contain LI's
					if(inNode.nodeName == "UL"){

						// List every LI and attach the onmouseover event.
						for(k = 0; k < inNode.childNodes.length; k++){
							inInNode = inNode.childNodes[k];
							
							if(inInNode.nodeName == "LI"){
			
								inInNode.onmouseover = function() {
									this.className += "over";
								}
					
								inInNode.onmouseout = function() {
									this.className=this.className.replace("over", "");
								}

							}								
						}
					}
				}
				
				// Attach actual event to mainlevel LI nodes.
				node.onmouseover = function() {
					this.className += "over";
				}
	
				node.onmouseout = function() {
					this.className=this.className.replace("over", "");
				}
			}
			

		}
		
		navRoot = document.getElementById("mainlevel");
	}
}

window.onload=startList;
