// JavaScript Document
fnSetHover = function(parentID, tag, hoverClass) {
	var el = document.getElementById(parentID);
	if (el) {
		el = el.getElementsByTagName(tag);
		for (var i=0; i < el.length; i++) {
			el[i].onmouseover = function(){this.className += " "+ hoverClass;}
			el[i].onmouseout = function(){this.className = this.className.replace(new RegExp(" "+ hoverClass +"\\b"), "");}
		}
	}
}

fnSetHoverSideMenu = function() {
	var el = document.getElementById("sideBarMenu");
	if (el) {
		el = el.getElementsByTagName("li");
		for (var i=0; i < el.length; i++) {
			el[i].onmouseover = function(){this.className += " over ";}
			el[i].onmouseout = function(){this.className = this.className.replace(new RegExp(" over\\b"), "");}
		}
	}
}

fnSetHoverTopMenu = function() {
	var el = document.getElementById("topBar");
	if (el) {
		el = el.getElementsByTagName("li");
		for (var i=0; i < el.length; i++) {
			el[i].onmouseover = function(){this.className += " over ";}
			el[i].onmouseout = function(){this.className = this.className.replace(new RegExp(" over\\b"), "");}
		}
	}
}

if (window.attachEvent) {
	window.attachEvent("onload", fnSetHoverTopMenu);
	window.attachEvent("onload", fnSetHoverSideMenu);
}
