function referer() { if(document.referrer.indexOf('kantoorcentrum') == -1) { document.location = '/index.php'; } else { history.back(-1); } } function delAfbeelding(afbeelding) { document.forms.formulier.afb.value = afbeelding; } function changeClass(Elem, myClass) { var elem; if(document.getElementById) elem = document.getElementById(Elem); else if (document.all) elem = document.all[Elem]; if (elem) elem.className = myClass; } function showImage(image, breedte) { document.main.width = breedte; document.main.src=image; } function showImageH(image, hoogte) { document.main.height = hoogte; document.main.src=image; } function emailValidation(entered) { with (entered) { spatie=value.indexOf(" "); apos=value.indexOf("@"); dotpos=value.lastIndexOf("."); lastpos=value.length-1; if (entered.value.length > 0) { if (apos<1 || dotpos-apos<2 || lastpos-dotpos>4 || lastpos-dotpos<2 || spatie>0) { //alert("Het opgegeven e-mail adres is ongeldig. Voorbeeld van een juist e-mailadres is 'info@domein.nl'."); return false; } else { return true; } } else { return true; } } } function confirmLink(txt) { if(confirm(txt)) { return true; } else { return false; } } function formCheck(strForm) { if (document.forms[strForm].email.value == "" || !emailValidation(document.forms[strForm].email)) { alert("Geldig e-mailadres invullen a.u.b."); document.forms[strForm].email.focus(); return false; } } function zoekCheck(strForm) { if (document.forms[strForm].zoektekst.value == "") { alert("Geef een zoektekst in a.u.b."); document.forms[strForm].zoektekst.focus(); return false; } } function nieuwsbriefCheck(strForm) { if (document.forms[strForm].naam.value == "" || document.forms[strForm].email.value == "" || !emailValidation(document.forms[strForm].email)) { alert("Naam en geldig e-mailadres invullen a.u.b."); document.forms[strForm].naam.focus(); return false; } } function passCheck(strForm) { if (document.forms[strForm].wachtwoord.value == "" || (document.forms[strForm].wachtwoord.value != document.forms[strForm].wachtwoord2.value)) { alert("Wachtwoorden komen niet overeen!"); document.forms[strForm].wachtwoord.focus(); return false; } } function openWin(strURL, strTitle, iWidth, iHeight) { window.open(strURL, strTitle,'scrollbars=no, menubar=no, directories=no, location=no, resizable=yes, toolbar=no status=yes, width='+iWidth+',height='+iHeight); }