// this function is run on window.onload and loops through the "navList" list
// assigning mouseover and mouseout events on the list items
startList = function() {
	//alert("starting");
 	if (document.all&&document.getElementById) {
 		if (document.getElementById("headerNav")) {
			navRoot = document.getElementById("headerNav");
			//alert("Node Name = " +navRoot.nodeName);
			for (i=0; i<navRoot.childNodes.length; i++) {
				node = navRoot.childNodes[i];
				//alert("Node Name = " +node.nodeName);
				if (node.nodeName=="UL") {
					for (j=0; j<node.childNodes.length; j++) {
						anode = node.childNodes[j];
						//alert("Node Name = " +anode.nodeName);
						if (anode.nodeName=="LI") {
							//alert("added");
							anode.onmouseover=function() {
								this.className+=" over";
								
								//position an iframe behind if one exists
								if(document.getElementById("DivShim")) {
									
									//declared subList for IE error when checking for undefined
									var subList;
									var ifrRef = document.getElementById("DivShim");
									
									for(k=0; k < this.childNodes.length; k++) {
										nodeChild = this.childNodes[k];
										if(nodeChild.nodeName == "UL") { subList = nodeChild; }
									}
									
									if (subList != undefined) {
										ifrRef.style.display = "block"; 
										ifrRef.style.width = subList.offsetWidth;
					  				ifrRef.style.height = subList.offsetHeight; 
					  				ifrRef.style.top = subList.offsetTop;
					  				ifrRef.style.left = subList.parentNode.offsetLeft; 
					  				ifrRef.style.zIndex = subList.style.zIndex - 1;
					  			}
								}
							}
							anode.onmouseout=function() {
								this.className=this.className.replace(" over", "");
								if(document.getElementById("DivShim")) {
									ifrRef = document.getElementById("DivShim");
									ifrRef.style.display = "none";
								}
							}
						}
					}
				}
			}
		}
	}
}
