//displays a 'not available' image wich fits in the round parsepartout
function toon_roundafbeelding(el) {
	if (el.src)
		el.src = '/images/not_available_round.gif';
}

//set correct classnames by mouseover event in dropdown menu (verkoopmaatschappijen)
function sfHover() {
	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);

//get the width and the height of the browser
var isIE6CSS = (document.compatMode && document.compatMode.indexOf("CSS1") >= 0) ? true : false;

function getInsideWindowWidth() {
   if (window.innerWidth)
       return window.innerWidth;
   else if (isIE6CSS)
       return document.body.parentElement.clientWidth;
   else if (document.body && document.body.clientWidth)
       return document.body.clientWidth;
   return 0;
}

function getInsideWindowHeight() {
	if (window.innerHeight)
        return window.innerHeight;
    else if (isIE6CSS)
        return document.body.parentElement.clientHeight;
    else if (document.body && document.body.clientHeight)
        return document.body.clientHeight;
    return 0;
}

//this function will get the current/computed style in IE and Moz/FF
function getStyle(obj,Attribute) {
	if (obj) {
		if (obj.currentStyle)
			var value = eval('obj.currentStyle.'+Attribute)
		else
			var value = eval('document.defaultView.getComputedStyle(obj, null).'+Attribute)
		return value;
	}
}

function setHeights() {
	schermbreedte 			= getInsideWindowWidth();
	schermhoogte 			= getInsideWindowHeight();
	var stropdasfade		= document.getElementById('stropdasfade');
	var maintable			= document.getElementById('maintable');
	var maintable_height	= maintable.offsetHeight;
	var footer				= document.getElementById('footer');
	var footer_height		= parseInt(getStyle(footer,'height'));
	
	if (maintable && footer && stropdasfade) {
		if (schermbreedte < 994)
			stropdasfade.style.display = 'none';
		
		if (maintable_height > schermhoogte) {
			footer.style.top = maintable_height;
		}
	}
}

