// Javascript for the CMS CSS Menu Module
var cssid = "primary-nav"; // CSS ID for the menuwrapper
var menuadd = "h";  // Character to be added to the specific classes upon hovering. So for example, if this is set to "h", class "menuparent" will become "menuparenth" when hovered over.
var menuh = "menuh"; // Classname for hovering over all other menu items
if (window.attachEvent) window.attachEvent("onload", cssHover);
function cssHover() {
	var sfEls = document.getElementById(cssid).getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			if (this.className == "menuparent") {
				this.className = this.className + menuadd;
			}
		}
		sfEls[i].onmouseout=function() {
			this.className = this.className.replace(new RegExp(menuadd + "$"), "");
		}
	}
	
	//rows in popup window
	for (var i=0; i<=3; i++) {
		var tmpObj = document.getElementById("popup_row" +i);
		tmpObj.onmouseover=function() {
			this.className = "popup_row popup_row_hover";
		}
		tmpObj.onmouseout=function() {
			this.className = "popup_row";
		}
	}
}