function getPaginaGrootte(){
			
	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;
	pageWidth = xScroll;
	pageHeight = yScroll;
	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);
	return arrayPageSize;
}

function getPaginaScroll(){

	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 ToonMelding(Pagina){
	var arrayPageSizes = getPaginaGrootte();
	var PaginaHoogte = (arrayPageSizes[1]+"px");
	var PaginaBreedte = (arrayPageSizes[0]+"px");
	
	//document.getElementById('GaSnelNaar').style.visibility = 'hidden';
	document.getElementById('DivAlertBoxAchtergrond').style.height = PaginaHoogte;
	document.getElementById('DivAlertBoxAchtergrond').style.width = PaginaBreedte;
	
	
	LaadMeldingInDiv(Pagina, 'DivAlertBoxContent');
	
	var NieuweBreedteDiv = 369;
	var NieuweHoogteDiv = 200;
	
	arrayPageScroll = getPaginaScroll();
	
	var TopPositie = arrayPageScroll[1] + (arrayPageSizes[1] / 15);
	TopPositie = TopPositie+'px';
	document.getElementById('DivAlertBoxContent').style.top = TopPositie;
	
	var LinkerPositie = ((arrayPageSizes[0] - NieuweBreedteDiv)/2);
	LinkerPositie = LinkerPositie+'px';
	document.getElementById('DivAlertBoxContent').style.left = LinkerPositie;

	document.getElementById('DivAlertBoxAchtergrond').style.display = 'block';
	document.getElementById('DivAlertBoxContent').style.display = 'block';
}

function LaadMeldingInDiv(option, DivID) {
	var urls = option;
	if(window.XMLHttpRequest) {
		reqss = new XMLHttpRequest();
	} else if(window.ActiveXObject) {
		reqss = new ActiveXObject("Microsoft.XMLHTTP");
	}
	reqss.open("GET", urls, true);
	reqss.onreadystatechange = callbackMelding;
	
	reqss.send(null);
}

function callbackMelding(DivID) {
	if(reqss.readyState != 4) { 
		document.getElementById('DivAlertBoxContent').innerHTML = '';
	}
	
	if(reqss.readyState == 4) {
		if(reqss.status == 200) {
			response = reqss.responseText;
			document.getElementById('DivAlertBoxContent').innerHTML = response;
			$('img[src$=.png]').ifixpng();
		} else {

		}
	}
}

function MeldingSluiten(Pagina){
	document.getElementById('DivAlertBoxAchtergrond').style.display = 'none';
	document.getElementById('DivAlertBoxContent').style.display = 'none';
}
