﻿ieHoverFix = function() 
{
	var cssItem;
	var newCSSVersion;
	
	for (var i = 0; i < document.styleSheets.length; i++)
	{
		for (var x = 0; x < document.styleSheets[i].rules.length ; x++)
		{
			cssItem = document.styleSheets[i].rules[x];
			if (cssItem.selectorText.indexOf("LI:hover") != -1)
			{
				newCSSVersion = cssItem.selectorText.replace(/LI:hover/gi, "LI.iehover");
				document.styleSheets[i].addRule(newCSSVersion , cssItem.style.cssText);
			}
			if (cssItem.selectorText.indexOf("LI:hover") != -1)
			{
				newCSSVersion = cssItem.selectorText.replace(/LI:hover/gi, "LI.iehover");
				document.styleSheets[i].addRule(newCSSVersion , cssItem.style.cssText);
			}
		}
	}	
	
	var myElement = document.getElementById("topNavMenu").getElementsByTagName("LI");
	
	for (var n=0; n < myElement.length; n++) 
	{
		myElement[n].onmouseout=function() 
		{
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
		myElement[n].onmouseover=function() 
		{
			this.className+=" iehover";
		}
	}
}

if (window.attachEvent)
{
	window.attachEvent("onload", ieHoverFix);
}