//variabelen die door het hele script gebruikt kunnen worden (global variables)
var w;
var h;
var pos,posM,loc;
var divCentrWidth;
var divCentrHeight;
var divCentrPosH;
var divCentrPosV;
var divInhWidth;
var divInhHeight;
var divInhPosH;
var divInhPosV;
var center;
var inhoud;
var side;
var i,j,k,l,m,r,fade;
var menuArray;


//Hier worden waardes toegekend aan de global variables
function variables(i){

	w = Math.round(document.body.clientWidth);
	h = Math.round(document.body.clientHeight);
	side = 100;
	fade = 100;
	pos = i;
	divCentrWidth = w-side;
	divCentrHeight = Math.round((h/10)*8);
	divCentrPosH = 0;
	divCentrPosV = Math.round((h/10)*2-20);
		if(h<660){
			divCentrHeight = Math.round((h/10)*7);
			divCentrPosV = Math.round((h/10)*3-20);
		}
	divInhWidth = Math.round(w/2);
	divInhHeight = divCentrHeight;
	divInhPosH = Math.round((divCentrWidth-divInhWidth)/2);
	divInhPosV = 0;
	center = document.getElementById('centerDiv').style;
	inhoud = document.getElementById('inhoudDiv').style;


	document.getElementById('geenJavaDiv').style.visibility = "hidden";
	var bodyDiv = document.getElementById('bodyDiv').style;
		bodyDiv.width = w-side;
		bodyDiv.height = h;
		bodyDiv.left = side;
	document.getElementById('extraDiv').style.height = h-76;
	center.width = divCentrWidth;
	center.height = divCentrHeight;
	center.left = divCentrPosH;
	center.top = divCentrPosV;
	inhoud.width = divInhWidth;
	inhoud.height = divInhHeight;
	inhoud.left = divInhPosH;
	inhoud.top = divInhPosV;

		createMenu(1);
		dataDivs(1);
		setTimeout("checkResize()",5000);
}


function checkResize(){
	var wTemp = Math.round(document.body.clientWidth);
	var hTemp = Math.round(document.body.clientHeight);
		if(w!=wTemp){clearTimeout(r);variables(pos);}
		else if(h!=hTemp){clearTimeout(r);variables(pos);}

	r = setTimeout("checkResize()",1000);
}
