function getWindowHeight() {
    windowHeight = 0;
    if (typeof(window.innerHeight) == 'number') {
        windowHeight = window.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) {
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body && document.body.clientHeight) {
		windowHeight = document.body.clientHeight;
    }
    return windowHeight;
}

function getBrowser () {
    var mvIndex;
    var mozVers;
    var os = navigator.platform.toLowerCase(); 
    var agt = navigator.userAgent.toLowerCase(); 
    var ver = navigator.appVersion.toLowerCase();
    
    if (os.indexOf('win') != -1) {
        if (agt.indexOf("msie 6.0")!=-1) return "WIN_IE6";
        else if (agt.indexOf("msie 5.5")!=-1) return "WIN_IE55";
        else if (agt.indexOf("msie 5.0")!=-1) return "WIN_IE50";
        else if (agt.indexOf("netscape")!=-1) return "Netscape";
        else if (agt.indexOf("mozilla")!=-1) {
            var mvIndex = agt.indexOf('; rv:1.');
            var mozVers = agt.substr(mvIndex + 7, 1); 
            if (mozVers > 3) return "WINMOZ";
        }
    }
    else if (os.indexOf('mac') != -1) {
        if (agt.indexOf("safari")!=-1) return "MAC_SAF";
        else if (agt.indexOf("netscape")!=-1) return "Netscape";
        else if (agt.indexOf("mozilla")!=-1) {
            var mvIndex = agt.indexOf('; rv:1.');
            var mozVers = agt.substr(mvIndex + 7, 1); 
            if (mozVers > 3) return "WINMOZ";
        }
    }
}        

function FooterInit (inhoud_boven, divider_hoogte, footer_hoogte) {
    if (document.getElementById) {
        var windowHeight = getWindowHeight();
        if (windowHeight > 0) {
			footerElement = document.getElementById ("IMG_footer");
			inhoudElement = document.getElementById ("DIV_inhoud");
			contentHeight = Math.max (inhoudElement.offsetHeight, divider_hoogte);
            if ((windowHeight - inhoud_boven - contentHeight - footer_hoogte) >= 0) {
				footerElement.style.top = (windowHeight - footer_hoogte) + "px";
			} else {
				footerElement.style.top = (inhoud_boven + contentHeight) + "px";
			}
        }
		setDisplay ("IMG_footer", 1);
    }
}

function FormulierInit () {
// dummy
}

function KaartInit () {
// dummy functie
}

function bodyOnLoad (inhoud_boven, divider_hoogte, footer_hoogte) {
	FooterInit (inhoud_boven, divider_hoogte, footer_hoogte);
	FormulierInit ();
	KaartInit ();
}

