// Make menus function in IE

startList = function() {
	
	if (document.all&&document.getElementById) {
	
	//select the menu
	navRoot = document.getElementById("nav");
	
		//get each of the list/menu items and add a mouseover/mouseout function for IE
		for (i=0; i<navRoot.childNodes.length; i++) {
	
		node = navRoot.childNodes[i];
	
			if (node.nodeName=="LI") {
	
				node.onmouseover=function() {
					this.className+="over";
				}
		
				node.onmouseout=function() {
					this.className=this.className.replace("over", "");
				}

				// second level of nodes
				for (j=0; j<node.childNodes.length; j++) {

					node2 = node.childNodes[j];
									
					for (k=0; k<node2.childNodes.length; k++) {
						
					node3 = node2.childNodes[k];
						
						if (node3.nodeName=="LI") {
							
							node3.onmouseover=function() {
								this.style.backgroundColor="#cc0000";
							}
							
							node3.onmouseout=function() {
								this.style.backgroundColor="#FF0000";
							}
							
						}
						
					}
						
				}

			}
			
		}
	}
}

window.onload=startList;