var mouseInMain = false;
var mouseInChild = false;
hoverMenuForIE = function() {
	if(document.getElementById("mainMenu"))
	{	// menu is a horizontal hover
		var menuLIs = document.getElementById("mainMenu").getElementsByTagName("li");
		for (var i=0; i<menuLIs.length; i++) {
			menuLIs[i].onmouseover=function() {
				mouseInMain = true;
				this.className+=" hover";
				var objULs = this.getElementsByTagName("ul");				
				if( objULs.length >0 && objULs[0]!= null && objULs[0] != "undefined"){
					objULs[0].style.display = "block";
					objULs[0].onmouseover = function(){ this.parentNode.className += " hover"; }
					objULs[0].onmouseout = function(){this.parentNode.className=this.parentNode.className.replace(new RegExp(" hover\\b"), "");}
				}
			}
			menuLIs[i].onmouseout=function() {
				var objULs = this.getElementsByTagName("ul");
				if( objULs.length >0 && objULs[0]!= null && objULs[0] != "undefined"){
					objULs[0].style.display = "none";
				}
			}
		}
	}
}
schedule("window", hoverMenuForIE);