// 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++) {
		if (sfEls[i].className != "menu_promos") {
			sfEls[i].onmouseover=function() {
				if (this.className != "") {
					this.className = this.className + menuadd;
				}
				else {	
					this.className = menuh;
				}
			}
	
			sfEls[i].onmouseout=function() {
				if (this.className == menuh) {
					this.className = "";
				}
				else {
					this.className = this.className.replace(new RegExp(menuadd + "$"), "");
				}
			}
		}
	}
}
function P7_MinMaxW(a,b){
	var nw="auto",w=document.documentElement.clientWidth;
	if(w>=b){nw=b+"px";}if(w<=a){nw=a+"px";}return nw;
}
function fixPNG(element)
{
	if (/MSIE (5\.5|6).+Win/.test(navigator.userAgent))
	{
		var src;		
		if (element.tagName=='IMG')
		{
			if (/\.png$/.test(element.src))
			{
				src = element.src;
				element.src = "../images/pixClear.gif";
			}
		}
		else
		{
			src = element.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i)
			if (src)
			{
				src = src[1];
				element.runtimeStyle.backgroundImage="none";
			}
		}		
		if (src) element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='crop')";
	}
}

