function initMenu() {
	if (!document.body.currentStyle) return;
	
	var navmenu = document.getElementById("navmenu");
	if (navmenu && navmenu.childNodes.length > 0 && navmenu.childNodes[0].tagName == "UL") {
		setupMenu(navmenu.childNodes[0]);
	}
}

function setupMenu(menu) {
	if (menu && menu.tagName == "UL") {
		for (i = 0; i < menu.childNodes.length; i++) {
			if (menu.childNodes[i].tagName == "LI") {
				for (j = 0; j < menu.childNodes[i].childNodes.length; j++) {
					if (menu.childNodes[i].childNodes[j].tagName == "UL") {
						menu.childNodes[i].onmouseover = function() {
							this.lastChild.style.visibility = "visible";
							if (this.lastChild.className == "ie_fix") {
								toggleFieldsForIE("hide");
							}
						}
						
						menu.childNodes[i].onmouseout = function() {
							this.lastChild.style.visibility = "hidden";
							if (this.lastChild.className == "ie_fix") {
								toggleFieldsForIE("show");
							}
						}
					}
				}
			}
		}
	}
}

function toggleFieldsForIE(mode) {
	// Dummy function. Declare this function for any page that needs to temporarily hide fields in IE.
}


function addOnLoad(func) {
	var oldonload = window.onload;
	
	if (typeof window.onload != 'function') {
		window.onload = func;
	}
	else {
		window.onload = function() {
			if (oldonload) {
				oldonload();
			}
			func();
		}
	}
}


addOnLoad(initMenu);


// window.onload = initMenu;
