
/*
 * This functionality needs to be merged with maxmenu (the previous version of this script)
 */


/* Function to fix the menu hover effect in MSIE */
onload = function startList() {
	if(document.all && document.getElementById) {
		navRoot = document.getElementById("menuFirstLevel");
		if(navRoot == null) {
			if(location.href.indexOf('.devel.max.nl') != -1) {
				alert('Er is geen <ul id="menuFirstLevel"> element in de pagina gevonden!');
			}
			return;
		}

		for(i = 0; i < navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if(node.nodeName == "LI") {
				node.onmouseover=function() {
					this.className+=" hover";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" hover", "");
				}
			}
		}
	}
}

if(document.all) {
	if (window.attachEvent) {
		window.attachEvent("onload", startList)
	}
	else {
		window.onload=startList;
	}
}

