// Flash detect script for home page
function makeFlashObject(SwfURL, w, h, id, flashVars, flashScale, flashVersion){
	if (flashVersion == undefined) {
		flashVersion = 7;
	}

	var SwfHTML = 
		'<object \n' +
			'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \n' +
			'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/Swflash.cab#version=' + flashVersion + ',0,0,0" \n' +
			'id="'+id+'" \n' +
			'align="middle" \n' +
			'width="'+ w +'" height="' + h + '" \n' +
		'>\n' +
			'<param name="movie" value="'+SwfURL+'" />\n' +
			(flashVars ? ('<param name="FlashVars" value="'+ flashVars +'"/>\n') : '') +
			'<param name="allowScriptAccess" value="always" />\n' +
			'<param name="bgcolor" value="#999999" />\n' +
			'<param name="menu" value="false"/>\n' +
			'<param name="quality" value="high" />\n' +
			'<param name="wmode" value="transparent" />\n' +
			(flashScale ? ('<param name="scale" value="'+ flashScale +'"/>\n') : '') +
			'<embed \n' +
				'type="application/x-shockwave-flash" \n' +
				'pluginspage="http://www.macromedia.com/go/getflashplayer" \n' +
				'name="' + id + '" \n' +
				'align="middle" \n' +
				'width="' + w + '" height="' + h + '" \n' +
				'src="'+ SwfURL +'" \n' +
				(flashVars ? ('FlashVars="' + flashVars + '" \n') : '') +
				'allowScriptAccess="always" \n' +
				'bgcolor="#999999" \n' +
				'menu="false" \n' +
				'quality="high" \n' +
				'wmode="transparent" \n' +
				(flashScale ? ('scale="' + flashScale + '" \n') : '') +
			'/>\n' +
		'</object>';
	document.write(SwfHTML);
}
// end Flash detect script

// processes URL requests

function RevlonPopUp(RevlonURL) {
	var varFooterPopLeft = (screen.availWidth / 2) - 400;		
	var varFooterPopTop = (screen.availHeight / 2) - 375;
	window.open(RevlonURL,"RevlonPopup","top=" + varFooterPopTop + ",left=" + varFooterPopLeft + ",width=800,height=725,location=yes,toolbar=yes,menubar=yes,scrollbars=yes");
}

// PNG transparency script
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])
   if ((version >= 5.5) && (document.body.filters)) 
   {
      for(var i=0; i<document.images.length; i++)
      {
         var img = document.images[i]
         var imgName = img.src.toUpperCase()
         if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
         {
            var imgID = (img.id) ? "id='" + img.id + "' " : ""
            var imgClass = (img.className) ? "class='" + img.className + "' " : ""
            var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
            var imgStyle = "display:inline-block;" + img.style.cssText 
            if (img.align == "left") imgStyle = "float:left;" + imgStyle
            if (img.align == "right") imgStyle = "float:right;" + imgStyle
            if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
            var strNewHTML = "<span " + imgID + imgClass + imgTitle
            + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
            + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
            + "(src=\'" + img.src + "\', sizingMethod='image');\"></span>" 
            img.outerHTML = strNewHTML
            i = i-1
         }
      }
   }    
}
window.attachEvent("onload", correctPNG);
// end PNG transparency script

// Rollover function for SubNav
startList = function() {
	if (document.all && document.getElementById) {
		navRoot = document.getElementById("NavList");
		for (i=0; i<navRoot.childNodes.length; i++) {
			  node = navRoot.childNodes[i];
			  if (node.nodeName=="LI") {
				  node.onmouseover=function() {
				  this.className+=" over";
				    }
				  node.onmouseout=function() {
				  this.className=this.className.replace
				      (" over", "");
				   }
			   }
		  }
	 }
}
window.onload=startList;
// end Rollover function for SubNav

