function intPageHeight() {
	// http://www.quirksmode.org/viewport/compatibility.html
	var x,y;
	var test1 = document.body.scrollHeight;
	var test2 = document.body.offsetHeight
	if (test1 > test2) // all but Explorer Mac
	{
		//x = document.body.scrollWidth;
		y = document.body.scrollHeight;
	}
	else // Explorer Mac;
	//would also work in Explorer 6 Strict, Mozilla and Safari
	{
		//x = document.body.offsetWidth;
		y = document.body.offsetHeight;
	}
	return y;
}

function intScreenHeight() {
	// http://www.quirksmode.org/viewport/compatibility.html
	var x,y;
	if (self.innerHeight) // all except Explorer
	{
		// x = self.innerWidth;
		y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
	// Explorer 6 Strict Mode
	{
		// x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		// x = document.body.clientWidth;
		y = document.body.clientHeight;
	}
	
	return y;
}


function setMargeKolomHeight(){
	intUsedHeight=0;	
	if (contentType=="index") {		
		intUsedHeight=intUsedHeight+getElt('content').offsetHeight;	
		if(getElt('topnav')) intUsedHeight=intUsedHeight+getElt('topnav').offsetHeight;
	} else {		
		// wat neemt meer ruimte in? overlay of koloms?
		intOverlay=getElt('content_overlay').offsetHeight + 70;
		intKoloms=getElt('content').offsetHeight + getElt('topnav').offsetHeight;
		if (intOverlay>intKoloms) {
			intUsedHeight=intUsedHeight+intOverlay;
		} else {
			intUsedHeight=intUsedHeight+intKoloms;
		}
	}
	//intUsedHeight=intUsedHeight+getElt('idCustomOptions').offsetHeight;
	// 20px voor customoptions bar, 60px voor margin
	intUsedHeight=intUsedHeight+80;
	if(getElt('theFooter')) getElt('theFooter').style.top=intUsedHeight;
	// trek lijnen uit, indien we niet een startpagina laten zien.
	if (contentType!="index") {
		intHeightLijnen=intUsedHeight-20-280;
		getElt('linkerlijn').style.height=intHeightLijnen;
		getElt('rechterlijn').style.height=intHeightLijnen;
	}

	// content_sidekick_1
	try {
		divContentSideKick1Height=document.getElementById("content_sidekick_1").offsetHeight;
		if (divContentSideKick1Height>intMaxHeight) intMaxHeight=divContentSideKick1Height;
	} catch(e) {
		
	}

	try {	
		// substract standard padding:		
		if (divMatrixHeight==0) intMaxHeight=intMaxHeight-20;
		document.getElementById("content_logo").style.height=intMaxHeight + "px";
		document.getElementById("content_main").style.height=intMaxHeight + "px";
		document.getElementById("content_sidekick_1").style.height=intMaxHeight + "px";		
		document.getElementById("matrix_wrapper").style.height=intMaxHeight + "px";		
		document.getElementById("footer").style.top=(document.getElementById("content_main").offsetTop + intMaxHeight) + "px";
		
	} catch (e) {
	}
	
	
}
