//koppel de juiste classes bij mouseover uitklapmenu
sfHover = function() {
	if (document.getElementById("nav")) {
		var sfEls = document.getElementById("nav").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//hoogte browser
	var isNav4, isNav6
	var isBrand = navigator.appName
	var navVer = parseInt(navigator.appVersion)
	var isNav4 = (isBrand == "Netscape" && navVer < 5) ? true : false
	var isNav6 = (isBrand == "Netscape" && navVer >= 5) ? true : false

function getInsideWindowHeight() {
	if (isNav4 || isNav6)
		return window.innerHeight
 	else 
	    return document.body.clientHeight
}

//this function will get the current/computed style in IE and Moz/FF
function getStyle(obj,Attribute) {
	if (obj.currentStyle) //if IE
		var value = eval('obj.currentStyle.'+Attribute)
	else //if Mozilla or FF
		var value = eval('document.defaultView.getComputedStyle(obj, null).'+Attribute)
	return parseInt(value);
}

//zet hoogtes van verschilldende divjes goed
function setHeights() {
	schermhoogte 		= getInsideWindowHeight();
	var mainsite 		= document.getElementById('mainsite');
	var maintable 		= document.getElementById('maintable');
	var vpmiddenboven	= document.getElementById('vpMiddenBoven_0_3');
	var beeld			= document.getElementById('beeld');
	var height 			= maintable.offsetHeight;
	var margintop 		= parseInt(getStyle(maintable,'top'));
	if (beeld !== null)
	var beeldhoogte 	= parseInt(getStyle(beeld,'height'));

	if (mainsite && maintable) {
		if ((height + margintop) < schermhoogte) {
			maintable.style.height = schermhoogte - margintop;
			if (beeld !== null) {
				beeld.style.top = schermhoogte - beeldhoogte;
				beeld.style.display = 'block';
			}
		} else {
			mainsite.style.height = height + margintop;
			if (beeld !== null) {
				beeld.style.top = height + margintop - beeldhoogte;
				beeld.style.display = 'block';
			}
		}
		if (vpmiddenboven !== null)
			vpmiddenboven.style.height = '90px';
	}
}

window.onresize = setHeights;