function addHover() {
	if (document.getElementById) {
		var nav = document.getElementById("mainnav");
		if (nav) {
			var el = nav.getElementsByTagName("LI");
			for (var i=0; i<el.length; i++) {
				el[i].onmouseover = function() { this.className += " hover"; }
				el[i].onmouseout = function() { this.className = this.className.replace(new RegExp(" hover\\b"), ""); }
			}
		}
	}
}

if (window.attachEvent) {
	window.attachEvent("onload", addHover);
}
else if (window.opera) {
	window.onload = function () {
		addHover();
	}
}

