// JavaScript Document window.onerror = stopError function stopError() { return true; } // We need the path bacause of the base-tag var baseHref = ""; function getBase(){ var baseTag = document.getElementsByTagName("base"); for(var i = 0; i < baseTag.length; i++){ baseId = baseTag[i].id; baseHref = baseTag[i].href; } } getBase(); // We need to modify the anchors bacause of the base-tag function replaceAnchors(){ var linkTags = document.getElementsByTagName("a"); for(var i = 0; i < linkTags.length; i++){ linkHref = linkTags[i].href; anchorPos = linkHref.indexOf("#"); if(anchorPos!=-1){ anchorName = linkHref.substr(anchorPos); linkTags[i].href = "javascript:void(document.location.hash='"+anchorName+"')"; } } } if(window.addEventListener) window.addEventListener('load', replaceAnchors, false); else if (window.attachEvent) window.attachEvent("onload", replaceAnchors); function Show_afbeelding(photo_id,gallery_id){ var leftPos = (screen.availWidth-640) / 2; var topPos = (screen.availHeight-480) / 2; popupWin = window.open('','','width=640,height=480, status=no,scrollbars=auto,resizable=yes,titlebar=0,top=' + topPos + ',left=' + leftPos); popupWin.location=baseHref+'photo_popup.php?photo_id='+photo_id+'&gallery_id='+gallery_id; } function Show_nieuwsphoto(afbeelding){ var leftPos = (screen.availWidth-640) / 2; var topPos = (screen.availHeight-480) / 2; popupWin = window.open('','','width=640,height=480, status=no,scrollbars=auto,resizable=yes,titlebar=0,top=' + topPos + ',left=' + leftPos); popupWin.location=baseHref+'photo_popup.php?afbeelding='+afbeelding; } function isValidEmail(str) { var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i if (filter.test(str)){ return true; } else { return false; } } function doMail(which) { //Init var valid = "yes"; //Check if(which=="advies"){ if (document.all.naam.value=='') var valid = 'no'; // if (document.all.adres.value=='') var valid = 'no'; // if (document.all.postcode.value=='') var valid = 'no'; // if (document.all.plaats.value=='') var valid = 'no'; // if (document.all.telefoon.value=='') var valid = 'no'; if (document.all.email.value=='') var valid = 'no'; // if (document.all.dag.value=='') var valid = 'no'; // if (document.all.tijdstip.value=='') var valid = 'no'; // if (document.all.informatie.value=='') var valid = 'no'; } else if(which=="offerte"){ var total = 0; total = document.all.Raam1totalebreedte.value * document.all.Raam1totalehoogte.value; total += document.all.Raam1totalebreedte0.value * document.all.Raam1totalehoogte0.value; total += document.all.Raam1totalebreedte1.value * document.all.Raam1totalehoogte1.value; total += document.all.Raam1totalebreedte2.value * document.all.Raam1totalehoogte2.value; total += document.all.Raam1totalebreedte3.value * document.all.Raam1totalehoogte3.value; total += document.all.Raam1totalebreedte4.value * document.all.Raam1totalehoogte4.value; total += document.all.Raam1totalebreedte5.value * document.all.Raam1totalehoogte5.value; total += document.all.Raam1totalebreedte6.value * document.all.Raam1totalehoogte6.value; total += document.all.Raam1totalebreedte7.value * document.all.Raam1totalehoogte7.value; total += document.all.Raam1totalebreedte8.value * document.all.Raam1totalehoogte8.value; total += document.all.Raam1totalebreedte9.value * document.all.Raam1totalehoogte9.value; total += document.all.Raam1totalebreedte10.value * document.all.Raam1totalehoogte10.value; total += document.all.Raam1totalebreedte11.value * document.all.Raam1totalehoogte11.value; total += document.all.Raam1totalebreedte12.value * document.all.Raam1totalehoogte12.value; for (var i=1;i<=14;i++){ // if (document.all.veld.value=='') var valid = 'no'; } if (document.all.naam.value=='') var valid = 'no'; // if (document.all.adres.value=='') var valid = 'no'; // if (document.all.postcode.value=='') var valid = 'no'; // if (document.all.plaats.value=='') var valid = 'no'; // if (document.all.telefoon.value=='') var valid = 'no'; if (document.all.email.value=='') var valid = 'no'; if (document.all.monteren.value=='') var valid = 'no'; // if (document.all.informatie.value=='') var valid = 'no'; } else if(which=="ambassadeur"){ // if (document.all.nummer.value=='') var valid = 'no'; if (document.all.naam.value=='') var valid = 'no'; // if (document.all.adres.value=='') var valid = 'no'; // if (document.all.postcode.value=='') var valid = 'no'; // if (document.all.plaats.value=='') var valid = 'no'; // if (document.all.telefoon.value=='') var valid = 'no'; // if (document.all.datum.value=='') var valid = 'no'; if (document.all.email.value=='') var valid = 'no'; if (document.all.naam_nieuw.value=='') var valid = 'no'; // if (document.all.adres_nieuw.value=='') var valid = 'no'; // if (document.all.postcode_nieuw.value=='') var valid = 'no'; // if (document.all.plaats_nieuw.value=='') var valid = 'no'; // if (document.all.telefoon_nieuw.value=='') var valid = 'no'; if (document.all.email_nieuw.value=='') var valid = 'no'; if (document.all.verklaar_contact.checked==false) var valid = 'no'; if (document.all.rekeningnummer.value=='') var valid = 'no'; } //If ok, then submit if (valid == "yes") { if (total < 3000000) { alert("Minimale ordergrootte is 3 vierkante meter."); } else { document.home_form.action=baseHref+"index.php?pagina_id=1&show_mail=yes&do_mail=yes&which="+which; document.home_form.submit(document.home_form); } } else { alert("U dient alle vereiste velden in te voeren."); } } function isDefined(obj){ varToStr=eval("'"+obj+"'"); if(varToStr=="undefined") return false; else return true; } function doPrint(page) { text = "