
 TIMER = "";


 function Overlay(h,file) {
	if (TIMER <= 850) {
		TIMER = setTimeout("OverlayDummy()",850);
		document.getElementById("overlay_content_holder").style.marginTop = (getScrollHeight()+150);
		document.getElementById("overlay").style.display = "block";
 		opacity("overlay",0,80,400);
		setTimeout("document.getElementById(\"overlay_content_holder\").style.display = \"block\"",430);

		PlayerChg(file);
	}
 
 }

 function getScrollHeight() {
   var h = window.pageYOffset ||
           document.body.scrollTop ||
           document.documentElement.scrollTop;
           
   return h ? h : 0;
 }

 function OverlaySize() {
	if (window.innerHeight && window.scrollMaxY) {// Firefox
		yWithScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		yWithScroll = document.body.scrollHeight;
	} else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
		yWithScroll = document.body.offsetHeight;
  	}
	document.getElementById("overlay").style.height = yWithScroll;
}

 function OverlayClose() {
	if (TIMER <= 850) {
		TIMER = setTimeout("OverlayDummy()",850);
		

	//	opacity("overlay_content_holder",100,0,400);
	// 
		PlayerChg("");
 		setTimeout("opacity(\"overlay\",80,0,400)",430);
		setTimeout("document.getElementById(\"overlay\").style.display = \"none\"",831);
		setTimeout("document.getElementById(\"overlay_content_holder\").style.display = \"none\"",832);

	}

 }

 function OverlayDummy() { TIMER = ""; }

 function PlayerChg(file) {
	if (file) {
		document.getElementById("player").innerHTML = "<object style=\"margin-top:10px;\" type=\"application/x-shockwave-flash\" width=\"510\" height=\"382\" wmode=\"transparent\" data=\"vplayer.swf?file=" + file + "&autostart=true\"><param name=\"movie\" value=\"vplayer.swf?file=" + file + "&autostart=true\" /><param name=\"wmode\" value=\"transparent\" /></object>";
	}
	else { document.getElementById("player").innerHTML = ""; }
 }

 window.onload = OverlaySize;