
function initShadowHome() {
    try {
        var height = info(38, 28) + 'px';
        document.getElementById('shadow_right').style.height = height;
    } catch (e) {alert(e); }
}

function initShadowWoningen(intCase) {
    try {
        var height = info(38, intCase) + 'px'; 
        document.getElementById('shadow_right').style.height = height;
    } catch (e) { }
}

function initShadowOmgeving() {
    try {
        var height = info(38, -82) + 'px';
        document.getElementById('shadow_right').style.height = height;
    } catch (e) { }
}

function initShadowInschrijven() {
    try {
        var height = info(38, -82) + 'px';
        document.getElementById('shadow_right').style.height = height;
    } catch (e) { }
}

function initShadowTuinOmgeving() {
    try {
        var height = info(38, -172) + 'px';
        document.getElementById('shadow_right').style.height = height;
    } catch (e) { }
}

function info(intInput1, intInput2) {
    var str = "";
    if (document.body.clientHeight) {
        //IE : 1010
        return (document.body.clientHeight) - intInput1;
    }
    if (window.outerHeight) {
        //FF : 1000
        return (window.outerHeight) - intInput2 + 105;
    }
}

function CheckForm(objForm) {
    msg = "";

    if (!isInput(objForm.achternaam.value)) { msg += "Vul a.u.b. uw achternaam in\n"; }
    if (!isInput(objForm.adres.value)) { msg += "Vul a.u.b. uw adres in\n"; }
    if (!isInput(objForm.woonplaats.value)) { msg += "Vul a.u.b. uw woonplaats in\n"; }
    if (!isInput(objForm.email.value)) { msg += "Vul a.u.b. uw e-mailadres in\n"; }
    else {
        if (!isEmail(objForm)) msg += "Uw e-mailadres is niet correct\n";
    }
    if (!isInput(objForm.telefoon.value)) { msg += "Vul a.u.b. uw telefoonnummer in\n"; }

    if (msg == "") {
        objForm.submit();
    }
    else {
        alert(msg);
    }
}

function isInput(veld) {
    if (veld == null || veld == "" || veld == veld.defaultValue) {
        return false;
    }
    return true;
}

function isEmail(f) {

    if (f.email.value.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1) {
        return true;
    }
    else {
        f.email.focus();
        return false;
    }
}

function expand(s) {
	var td = s;
        var div = td.getElementsByTagName("div").item(0);
        div.className = "menuHover";
}

function collapse(s) {
	var td = s;
        var div = td.getElementsByTagName("div").item(0);
	div.className = "menuNormal";
}

