function setDivHeight() {    var theDiv = document.getElementById('mainContent');    var divMin = 185; //gedeelte wat niet hoeft te worden opgevuld      var bodyH = checkWindowH();    var contentDiv = document.getElementById('contentHold');
    var contentH = contentDiv.offsetHeight;
    var contentPadding = 70;
    //resthoogte    divHeight=bodyH - divMin;
    // als de contentH kleiner is dan de divHeight... dan moet die even groot worden om de footer goed te plaatsen    if(contentH<divHeight) {
        //alert('contentH = '+contentH+' en bodyH = '+bodyH+ ' divHeight = '+divHeight );
        var contentH_new = divHeight- contentPadding;
        contentDiv.style.height =contentH_new +'px';
    }
    theDiv.style.height = divHeight+'px';    theDiv.style.display = 'block';}function checkWindowH() {    //per browser height checken    if( typeof( window.innerWidth ) == 'number' ) {        //Non-IE        bodyH = window.innerHeight;    } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {        //IE 6+ in 'standards compliant mode'        bodyH = document.documentElement.clientHeight;    } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {        //IE 4 compatible        bodyH = document.body.clientHeight;    }    return bodyH;}
// addLoadEvent()
// Adds event to window.onload without overwriting currently assigned onload functions.
// Function found at Simon Willison's weblog - http://simon.incutio.com/
//
function addLoadEvent(func)
{	
	var oldonload = window.onload;
	if (typeof window.onload != 'function'){
    	window.onload = func;
	} else {
		window.onload = function(){
		oldonload();
		func();
		}
	}
}
addLoadEvent(setDivHeight);
window.onresize= setDivHeight;
