var sb="videoReportScreenBlanker";
		var vr="videoReportBigContainer";
		function showVideoReport() {
			var b=document.createElement("div");
			b.id=sb;
			var s=b.style;
			s.position="absolute";
			s.top="0px";
			s.left="0px";
			s.width="100%";
			s.height=document.body.clientHeight+'px';
			s.backgroundColor="#000000";
			s.zIndex="998";
		    s.opacity = 0;
		    s.MozOpacity = 0;
		    s.KhtmlOpacity = 0;
		    s.filter = "alpha(opacity=0)";
			hideAllFlash();
			document.body.appendChild(b);
			fade(50, 0, 7);
			setTimeout("addVideo();", 550);
		}
		function addVideo() {
			// Height and width of the actual video report
			var vrHeight = 292;
			var vrWidth = 320;
			var nonFlashHTML = 'You do not appear to have Flash.  Flash is required to view this video report';
			var screenHeight=(self.innerHeight)?self.innerHeight:document.documentElement.clientHeight;
			var c=document.createElement("div");
			c.id=vr;
			var s=c.style;
			s.position="absolute";
			s.top="0px";
			s.right="0px";
			s.width="40%";
			s.zIndex="999";
			s.paddingTop=275+'px';
			c.innerHTML='<div style="text-align:left; padding:0; width:330px; height:340px; margin:0 auto; background:#fff; border:7px #c8c6ad solid;"><img style="cursor:pointer;" onclick="closeVideoReport();" src="/custom/templates/page/shared/images/vr_closebtn.gif" alt="Close Video Report" title="Close Video Report" /><p id="bigVideoReport" style="padding:0;margin:0;text-align:center; vertical-align:bottom;">'+nonFlashHTML+'</p></div>';
			document.body.appendChild(c);
			var so = new SWFObject("/custom/templates/page/shared/flash/luge.swf", "videoReportBig", vrWidth, vrHeight, "7");
			so.addParam("allowFullScreen", "true");
			so.addParam("FlashVars", "&clientID=58&subCat=749&prefix=http://www.resorts-interactive.com/");
			so.write("bigVideoReport");
		}
		function closeVideoReport() {
			fade(0, 50, -7);
			document.body.removeChild(document.getElementById(vr));
			window.setTimeout('document.body.removeChild(document.getElementById("'+sb+'"));unhideAllFlash();', 550);
		}
		function fade(target,next,step) {
			if(!document.getElementById(sb)) return;
			changeOpac(next,sb);
			next += step;
			if((step>0 && next < target) || (step<0 && next > target))
				setTimeout("fade("+target+","+next+","+step+");", 14);
		}
		
		//change the opacity for different browsers
		function changeOpac(opacity, id) {
		    var object = document.getElementById(id).style;
		    object.opacity = (opacity / 100);
		    object.MozOpacity = (opacity / 100);
		    object.KhtmlOpacity = (opacity / 100);
		    object.filter = "alpha(opacity=" + opacity + ")";
		}
		
		function hideAllFlash() {
			var allFlashObjects=document.getElementsByTagName('object');
			var allFlashEmbeds=document.getElementsByTagName('embed');
			for(var i=0;i<allFlashObjects.length;i++) {
				allFlashObjects[i].oldVis=allFlashObjects[i].style.visibility;
				allFlashObjects[i].style.visibility="hidden";
			}
			for(var i=0;i<allFlashEmbeds.length;i++) {
				allFlashEmbeds[i].oldVis=allFlashEmbeds[i].style.visibility;
				allFlashEmbeds[i].style.visibility="hidden";
			}
		}
		function unhideAllFlash() {
			var allFlashObjects=document.getElementsByTagName('object');
			var allFlashEmbeds=document.getElementsByTagName('embed');
			for(var i=0;i<allFlashObjects.length;i++) {
				try{
					allFlashObjects[i].style.visibility=allFlashObjects[i].oldVis;
				}catch(ex){
					// do nothing
				}
			}
			for(var i=0;i<allFlashEmbeds.length;i++) {
				try{
					allFlashEmbeds[i].style.visibility=allFlashEmbeds[i].oldVis;
				}catch(ex){
					// do nothing
				}
			}
		}
