landingPageOpen = "no";

var GETDATA = new Array();
var sGet = window.top.location.search;
if (sGet){
    sGet = sGet.substr(1);
    var sNVPairs = sGet.split("&");
    for (var i = 0; i < sNVPairs.length; i++)
    {
        var sNV = sNVPairs[i].split("=");
        var sName = sNV[0];
        var sValue = sNV[1];
        GETDATA[sName] = sValue;
    }
}

if(GETDATA["L"] != undefined){
	actieveTaal = GETDATA["L"];

	if(parseInt(actieveTaal) == 2){
		landingID = "landingOverlay_DE";
	}
	else if(parseInt(actieveTaal) == 4){
		landingID = "landingOverlay_NL";
	}
	else if(parseInt(actieveTaal) == 1){
		landingID = "landingOverlay_EN";
	}
}
else{
	landingID = "landingOverlay_NL";
}




function ReposLandingLayer(){
	if(landingPageOpen == "yes"){
		showAndPosContent(landingID);
	}
}


function showAndPosContent(contentDiv) {
  //get viewport's width and height
  contentDiv = document.getElementById(contentDiv);

	var browserName=navigator.appName;
	if(browserName==="Microsoft Internet Explorer") {
		if(document.documentElement.clientWidth==0) {
			var vpHeight=(document.body.clientHeight)
			var vpWidth=(document.body.clientWidth)
		}
		else {
			var vpHeight=(document.documentElement.clientHeight);
			var vpWidth=(document.documentElement.clientWidth);
		}
	}
	else{
	//FF
		vpWidth=self.innerWidth;
		vpHeight=self.innerHeight;
	}

  //get dialog's width -> breedte van contentDivElement
  w = contentDiv.style.width;
  strip=/[px]/gi; w = w.replace(strip,''); w = parseInt(w);
  dialogWidth = w;

  h = contentDiv.style.height;
  strip=/[px]/gi; h = h.replace(strip,''); h = parseInt(h);
  dialogHeight = h;

  //calculate position
  dialogLeft = Math.round((vpWidth/2) - (dialogWidth/2));
  dialogTop = Math.round((vpHeight/2) - (dialogHeight/2));

  // BROWSER SPECIFIC CORRECTION OF PLACEMENT OF DIV:
  if(document.all){
      dialogLeft = dialogLeft - 4;
      dialogTop = dialogTop - 4;
  }

  else{
      dialogLeft = dialogLeft;
      dialogTop = dialogTop;
  }

  if(dialogLeft < 0){ dialogLeft = 0 };
  if(dialogTop < 0){ dialogTop = 0 };

  //Position the Dialog
  contentDiv.style.left = dialogLeft+"px";
  contentDiv.style.top = dialogTop+"px";
  contentDiv.style.display="block";
}



