// JavaScript Document window.onerror = stopError function stopError() { // return true; } // Onload events if(window.addEventListener){ // Mozilla window.addEventListener('load', addEventListeners, false); } else if (window.attachEvent){ // IE window.attachEvent("onload", addEventListeners); } // handle keyboard events function addEventListeners(){ if (document.all && document.home_form) // Microsoft Internet Explorer document.home_form.onkeypress=keypress; else if (document.getElementById && document.forms["home_form"]) // Mozilla document.forms["home_form"].addEventListener("keyup",keypress,true); } // perform action based on keypress function keypress(e) { if (document.all) // Microsoft Internet Explorer tmp = window.event.keyCode; else if (document.getElementById) // Mozilla tmp = e.keyCode; func_str = ''; switch(tmp){ case 13: if("1"=="") func_str="doSearch();"; eval(func_str) return false } } 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='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='photo_popup.php?afbeelding='+afbeelding; } function Show_nieuwsbrief(nieuwsbrief_id){ var leftPos = (screen.availWidth-640) / 2; var topPos = (screen.availHeight-480) / 2; popupWin = window.open('','','width=640,height=480, status=no,scrollbars=yes,resizable=yes,titlebar=0,top=' + topPos + ',left=' + leftPos); popupWin.location = 'nieuwsbrief/view.php?nieuwsbrief_id='+nieuwsbrief_id; } function Popup_window(url){ var leftPos = (screen.availWidth-640) / 2; var topPos = (screen.availHeight-480) / 2; popupWin = window.open(url,'','width=640,height=480, status=no,scrollbars=yes,resizable=yes,titlebar=0,top=' + topPos + ',left=' + leftPos); } 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 isValidLink(str) { var filter = /^(file|http):\/\/\S+\.([a-z]{2,4})$/i if (filter.test(str)){ return true; } else { return false; } } function doMail(which) { //Init var valid = "yes"; //Check if(which=="mailinglist_aanmelden"){ if(document.getElementById('email').value=="" || !isValidEmail(document.getElementById('email').value)){ valid = 'no'; } } else if(which=="contact") { if (document.getElementById('naam').value=='') var valid = 'no'; if (document.getElementById('email').value=='') var valid = 'no'; if (document.getElementById('opmerkingen').value=='') var valid = 'no'; } else if(which=="activiteiten"){ if (document.getElementById('aanhef').value=='') var valid = 'no'; // if (document.getElementById('functie').value=='') var valid = 'no'; if (document.getElementById('postadres').value=='') var valid = 'no'; if (document.getElementById('postcode').value=='') var valid = 'no'; if (document.getElementById('woonplaats').value=='') var valid = 'no'; if (document.getElementById('telefoon').value=='') var valid = 'no'; // if (document.getElementById('mobiel').value=='') var valid = 'no'; if (document.getElementById('email').value=='') var valid = 'no'; // if (document.getElementById('geboortedatum').value=='') var valid = 'no'; // if (document.getElementById('kledingmaat').value=='') var valid = 'no'; } else if(which=="vacature"){ //Check var aantal_uploads = document.all.aantal_uploads.value; for(i=1;i<=aantal_uploads;i++) { thisfield = eval("document.all.userfile_" + i + ".value;") thisfield2 = eval("document.all.userfilename_" + i + ".value;") if(thisfield=="" || thisfield2=="") { valid = 'no'; } } if (document.getElementById('naam').value=='') var valid = 'no'; if (document.getElementById('roepnaam').value=='') var valid = 'no'; if (document.getElementById('adres').value=='') var valid = 'no'; if (document.getElementById('postcode').value=='') var valid = 'no'; if (document.getElementById('woonplaats').value=='') var valid = 'no'; if (document.getElementById('telefoon').value=='') var valid = 'no'; if (document.getElementById('email').value=='') var valid = 'no'; if (document.getElementById('nationaliteit').value=='') var valid = 'no'; if (document.getElementById('geboortedatum').value=='') var valid = 'no'; if (document.getElementById('geboorteplaats').value=='') var valid = 'no'; } else if(which=="open_vacature"){ if (document.getElementById('naam').value=='') var valid = 'no'; if (document.getElementById('adres').value=='') var valid = 'no'; if (document.getElementById('postcode').value=='') var valid = 'no'; if (document.getElementById('woonplaats').value=='') var valid = 'no'; if (document.getElementById('telefoon').value=='') var valid = 'no'; if (document.getElementById('email').value=='') var valid = 'no'; if (document.getElementById('bericht').value=='') var valid = 'no'; } //If ok, then submit if (valid == "yes") { document.home_form.action="index.php?pagina_id=1&show_mail=yes&do_mail=yes&which="+which; document.home_form.submit(document.home_form); } else { alert("U dient de vereiste velden in te vullen."); } } function isDefined(obj){ varToStr=eval("'"+obj+"'"); if(varToStr=="undefined") return false; else return true; } function Nieuwsblock(obj){ obj=(document.all) ? document.all[obj] : document.getElementById(obj); if(isDefined(obj)){ obj.style.display=(obj.style.display=='none') ? 'inline' : 'none'; if(obj.style.display!='none'){ document.all.nieuwsarrow.src="images/arrow-down.gif"; document.all.nieuwsarrow.alt="Open"; } else { document.all.nieuwsarrow.src="images/arrow-up.gif"; document.all.nieuwsarrow.alt="Close"; } } } function doPrint(page){ text = "