var navHover;

if (window.Prototype) {
	navHover = function() {
		$$("#main_nav li").each(function (elm) {
			Event.observe(elm, 'mouseover', function() { this.addClassName('iehover'); });
			Event.observe(elm, 'mouseout',  function() { this.removeClassName('iehover'); });
		});
	};

	Event.observe(window, 'load', navHover);
} else if (window.attachEvent) {
	navHover = function() {
		if (document.getElementById("main_nav")) {
			var lis = document.getElementById("main_nav").getElementsByTagName("li");
			for (var i=0; i<lis.length; i++) {
				lis[i].onmouseover = function() { this.className += " iehover"; }
				lis[i].onmouseout = function() { this.className = this.className.replace(new RegExp(" iehover\\b"), ""); }
			}
		}
	};

	window.attachEvent("onload", navHover);
}