function setLiHoverEvents(menuLi) {
	var total = menuLi.length;
	
	for (var i = 0; i < total; i++) {
		menuLi[i].onmouseover = function() {
			this.className += "hover";
		}
	
		menuLi[i].onmouseout = function() {
			this.className = this.className.replace("hover", "");
		}
	} // end for
}

function hover() {
	var menuUL = document.getElementsByTagName("UL");
	var total = menuUL.length;
	
	for(var i = 0; i < total; i++) {
		if(menuUL[i].className.indexOf("menu") != -1) {
			setLiHoverEvents(menuUL[i].getElementsByTagName("LI"));
		}
	} // end for
}

if (window.attachEvent) window.attachEvent("onload", hover);

