function showdeadcenterdiv(Xwidth,Yheight,divid) {
// First, determine how much the visitor has scrolled

var scrolledX, scrolledY;
if( self.pageYOffset ) {
scrolledX = self.pageXOffset;
scrolledY = self.pageYOffset;
} else if( document.documentElement && document.documentElement.scrollTop ) {
scrolledX = document.documentElement.scrollLeft;
scrolledY = document.documentElement.scrollTop;
} else if( document.body ) {
scrolledX = document.body.scrollLeft;
scrolledY = document.body.scrollTop;
}

// Next, determine the coordinates of the center of browser's window

var centerX, centerY;
if( self.innerHeight ) {
centerX = self.innerWidth;
centerY = self.innerHeight;
} else if( document.documentElement && document.documentElement.clientHeight ) {
centerX = document.documentElement.clientWidth;
centerY = document.documentElement.clientHeight;
} else if( document.body ) {
centerX = document.body.clientWidth;
centerY = document.body.clientHeight;
}

// Xwidth is the width of the div, Yheight is the height of the
// div passed as arguments to the function:
var leftOffset = scrolledX + (centerX - Xwidth) / 2;
var topOffset = scrolledY + (centerY - Yheight) / 2;
// The initial width and height of the div can be set in the
// style sheet with display:none; divid is passed as an argument to // the function
var o=document.getElementById(divid);
var r=o.style;
r.position='absolute';
r.top = topOffset + 'px';
r.left = leftOffset + 'px';

var o=document.getElementById('backgroundFilter');
var r=o.style;
r.width = centerX + 'px';
r.height = centerY + 'px';

} 

function backgroundFilter()
{
    var div;
	
	if (window.XMLHttpRequest) {
		// IE 7, mozilla, safari, opera 9 niets doen
	} else {
	
	// IE6, older browsers
			var centerX, centerY;
			if( self.innerHeight ) {
			centerX = self.innerWidth;
			centerY = self.innerHeight;
			} else if( document.documentElement && document.documentElement.clientHeight ) {
			centerX = document.documentElement.clientWidth;
			centerY = document.documentElement.clientHeight;
			} else if( document.body ) {
			centerX = document.body.clientWidth;
			centerY = document.body.clientHeight;
			}
					
			//scherm verkleinen en naarboven scrollen
				if(document.getElementById)
				// Standard way to get element
				div = document.getElementById('container'); 
				else if(document.all) 
				// Get the element in old IE's 
				div = document.all['container'];
				
				if (div.style.height == '') {
				div.style.height = (centerY-31) + "px"
				div.style.overflow = "hidden";
				scroll(0,0);
				}
				else
				{
				div.style.height = '';
				div.style.overflow = '';
				}
				
			showdeadcenterdiv(centerX,centerY,'backgroundFilter');
	
	}
	
    if(document.getElementById)
    // Standard way to get element
    div = document.getElementById('backgroundFilter'); 
    else if(document.all) 
    // Get the element in old IE's 
    div = document.all['backgroundFilter']; 
    
    // if the style.display value is blank we try to check it out here 
    if(div.style.display==''&&div.offsetWidth!=undefined&&div.offsetHeight!=undefined)
    {
        div.style.display = (div.offsetWidth!=0&&div.offsetHeight!=0)?'block':'none'; 
    }
    
    // If the background is hidden ('none') then it will display it ('block').
    // If the background is displayed ('block') then it will hide it ('none').
    div.style.display = (div.style.display==''||div.style.display=='block')?'none':'block';
	
} 

function popUp()
{
    var div;

	if (window.XMLHttpRequest) {
		// IE 7, mozilla, safari, opera 9 niets doen
	} else {
		showdeadcenterdiv(500,620,'popupWindow');
	}

	if(document.getElementById)
    // Standard way to get element
    div = document.getElementById('popupWindow'); 
    else if(document.all) 
    // Get the element in old IE's 
    div = document.all['popupWindow']; 
    
    // if the style.display value is blank we try to check it out here 
    if(div.style.display==''&&div.offsetWidth!=undefined&&div.offsetHeight!=undefined)
    {
        div.style.display = (div.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none'; 
    }
    
    // If the PopUp is hidden ('none') then it will display it ('block').
    // If the PopUp is displayed ('block') then it will hide it ('none').
    div.style.display = (div.style.display==''||div.style.display=='block')?'none':'block';
	
}

function PlaatsPopupScroll() {
	
	if (window.XMLHttpRequest) {
		// IE 7, mozilla, safari, opera 9 niets doen


	} else {
		// IE6, older browsers
			var centerX, centerY;
			if( self.innerHeight ) {
			centerX = self.innerWidth;
			centerY = self.innerHeight;
			} else if( document.documentElement && document.documentElement.clientHeight ) {
			centerX = document.documentElement.clientWidth;
			centerY = document.documentElement.clientHeight;
			} else if( document.body ) {
			centerX = document.body.clientWidth;
			centerY = document.body.clientHeight;
			}
			
			showdeadcenterdiv(centerX,centerY,'backgroundFilter');
			showdeadcenterdiv(500,620,'popupWindow');
	}

}

function schermhoogte() {
var y;
if (self.innerHeight) // all except Explorer
{
	y = self.innerHeight;
}
else if (document.documentElement && document.documentElement.clientHeight)
	// Explorer 6 Strict Mode
{
	y = document.documentElement.clientHeight;
}
else if (document.body) // other Explorers
{
	y = document.body.clientHeight;
}
return y;
}

// met ajax inlogdiv reloaden
function LoadPageInDiv(divID,DivContent)
{
var xmlhttp;
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {
  // code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
else
  {
  alert("Your browser does not support XMLHTTP!");
  }
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4)
  {
  document.getElementById(divID).innerHTML=xmlhttp.responseText;
  }
}
xmlhttp.open("GET",DivContent,true);
xmlhttp.send(null);
}