

img1x = new Image();
img1x.src = "/img/overlay.png";





function pornofilm(vpssite,episode,pi,country,lang){

 function getPageScroll(){
  var yScroll;
  if (self.pageYOffset) {
   yScroll = self.pageYOffset;
  } else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
   yScroll = document.documentElement.scrollTop;
  } else if (document.body) {// all other Explorers
   yScroll = document.body.scrollTop;
  }

  arrayPageScroll = new Array('',yScroll) 
  return arrayPageScroll;
 }


 function getPageSize(){
  var xScroll, yScroll;
  if (window.innerHeight && window.scrollMaxY) {	
   xScroll = document.body.scrollWidth;
   yScroll = window.innerHeight + window.scrollMaxY;
  } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
   xScroll = document.body.scrollWidth;
   yScroll = document.body.scrollHeight;
  } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
   xScroll = document.body.offsetWidth;
   yScroll = document.body.offsetHeight;
  }
	
  var windowWidth, windowHeight;
  if (self.innerHeight) {	// all except Explorer
   windowWidth = self.innerWidth;
   windowHeight = self.innerHeight;
  } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
   windowWidth = document.documentElement.clientWidth;
   windowHeight = document.documentElement.clientHeight;
  } else if (document.body) { // other Explorers
   windowWidth = document.body.clientWidth;
   windowHeight = document.body.clientHeight;
  }	
	
  // for small pages with total height less then height of the viewport
  if(yScroll < windowHeight){
   pageHeight = windowHeight;
  } else { 
   pageHeight = yScroll;
  }

  // for small pages with total width less then width of the viewport
  if(xScroll < windowWidth){	
   pageWidth = windowWidth;
  } else {
   pageWidth = xScroll;
  }


  arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
  return arrayPageSize;
 }



 function hideLayerbox(){
  objOverlay = document.getElementById('overlay');
  objLayerbox = document.getElementById('Layerbox');

  objOverlay.style.display = 'none';
//  objLayerbox.style.display = 'none';
  objBody.style.overflow = 'auto';

  selects = document.getElementsByTagName("select");
  for (i = 0; i != selects.length; i++) {
   selects[i].style.visibility = "visible";
  }

  document.onkeypress = '';
 }



 var arrayPageSize = getPageSize();
 var arrayPageScroll = getPageScroll();
 var objBody = document.getElementsByTagName("body").item(0);




 var objOverlay = document.createElement("div");
  objOverlay.setAttribute('id','overlay');
//  objOverlay.onclick = function () {hideLayerbox(); return false;}
  objOverlay.style.display = 'block';
  objOverlay.style.position = 'absolute';
  objOverlay.style.top = '0';
  objOverlay.style.left = '0';
  objOverlay.style.zIndex = '100';
  objOverlay.style.width = '100%';
  objOverlay.style.height = (arrayPageSize[1] + 'px');
  objOverlay.style.backgroundImage="url(/img/overlay.png)";

   objBody.insertBefore(objOverlay, objBody.firstChild);



	var LayerboxTop = arrayPageScroll[1] + ((arrayPageSize[3] - 600 - 2) / 3);
	var LayerboxLeft = ((arrayPageSize[0] - 800 - 2) / 2);


	var objBox = document.createElement("div");
	objBox.setAttribute('id','Box');
	objBox.style.zIndex = '110';
	objBox.style.display = 'block';
	objBox.style.position = 'absolute';
	objBox.style.top = (LayerboxTop < 0) ? "0px" : LayerboxTop + "px";
	objBox.style.left = (LayerboxLeft < 0) ? "0px" : LayerboxLeft + "px";
	objBox.style.paddingTop = '20px';
	objBox.style.width = 800 + 'px';
	objBox.style.height = 600 +'px';
	objBox.innerHTML="<div style=\"width: 800px; height: 600px;\" id=\"mswcustomsJnpEkTPCW\"><embed type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" src=\"http://www.mysecurewallet.nl/flash/msw.swf?p=10032&pi="+pi+"&taal="+lang+"&land="+country+"&site="+vpssite+"/&trailer="+episode+"&nocache=1242935810\" style=\"\" id=\"msw\" name=\"msw\" bgcolor=\"#FFFFFF\" quality=\"high\" wmode=\"transparent\" allowscriptaccess=\"always\" width=\"800\" height=\"600\"></div>";
        objOverlay.appendChild(objBox);


	var objBoxClose = document.createElement("img");
	objBoxClose.setAttribute('src','/img/sluiten.png');
	objBoxClose.style.zIndex = '120';
	objBoxClose.style.display = 'hidden';
	objBoxClose.style.position = 'absolute';
	objBoxClose.style.top = (arrayPageScroll[1] + ((arrayPageSize[3] - 600) / 3) + 7) +"px";
	objBoxClose.style.left = ((arrayPageSize[0] + 400) / 2) +"px";
	objBoxClose.style.cursor = 'pointer';
	objBoxClose.onclick = function () {hideLayerbox(); return false;}
//	objBoxClose.onload = setTimeout(this.style.display = 'block',100);
        objOverlay.appendChild(objBoxClose);




}


