//////////////////////////////////////////////
//
// Drop Navigation Hack for IE
//
//////////////////////////////////////////////

// Had to set up this function becuase IE does not recognize :hover css param unless it is applied to an <a> tag

// Solution number 1 - create an IE Hack (see below)
// Solution number 2 - DOWNLOAD FIREFOX (optional)

numElements = 5; 
// sets the number of nav elements on the page - example <ul id=nav0, nav1, nav2, nav3, nav4>

for(x=0; x<=numElements; x++){ 
// loop through each ul with the id and set onmouseover, onmouseout event to hide show nav in IE
	navid = "nav"+x;
	
	navRoot = document.getElementById(navid); 
	// <ul id=nav0, nav1, nav2, nav3, nav4
	
	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", "");
			}
		}
	} 
}