// 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 = "Print deze pagina\n"; text += document.getElementById(page).innerHTML; text = text.replace("doPrint('"+page+"')","print()"); text = text.replace("popupMail()",""); text += "
Venster sluiten
"; text += ""; printWin = window.open('','','width=600,height=420,scrollbars=yes,resizable=yes,titlebar=0'); printWin.document.write(text) printWin.document.close() printWin.print() } function popupMail() { mailWin = window.open('email_popup.php','','width=300,height=160,scrollbars=yes,resizable=yes,titlebar=0'); } var today = new Date(); var expiry = new Date(today.getTime() + 300 * 24 * 60 * 60 * 1000); function getCookie(name) { var name = "SOD___"+name; var index = document.cookie.indexOf(name + "="); if (index == -1) return null; index = document.cookie.indexOf("=", index) + 1; var endstr = document.cookie.indexOf(";", index); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(index, endstr)); } function setCookie(name, value) { var name = "SOD___"+name; if (value != null && value != "") { document.cookie = name + "=" + escape(value) + "; expires=" + expiry.toGMTString(); document.cookie = document.cookie; } } function getIFrameDocument(aID){ if (IFrameObj.contentDocument) { return IFrameObj.contentDocument; // For NS6 } else if (IFrameObj.contentWindow) { return IFrameObj.contentWindow.document; // For IE5.5 and IE6 } else if (IFrameObj.document) { return IFrameObj.document; // For IE5 } else { return false; } } var IFrameObj; // our IFrame object var isResized = false; var oContainer; // Containing the iframe function iframeWindow(url, target){ if(document.getElementById("iframe_holder").tagName=="TR"){ oContainer = document.getElementById("iframe_holder").cells[0]; } else { oContainer = document.getElementById("iframe_holder"); } callToServer(url, target); // Verwijderen en aanmaken van iframe noodzakelijk ivm cross-domain beveiliging browser if(url!="" && isResized==false){ isResized = true; if(document.all){ // IE oContainer.style.width = "100%"; oContainer.style.height = "100%"; } else if(document.getElementById){ //Mozilla targetWidth = document.getElementById("content").offsetWidth; targetHeight = document.getElementById("content").offsetHeight; oContainer.style.width = targetWidth; // minus left/right padding 8 + 8? oContainer.style.height = targetHeight; // minus top/bottom padding 20 + 20? } } // Positie van het menu corrigeren na eventueel wegvallen scrollbalk if(document.getElementById("holder")){ setHolder("siteondemand", "holder"); moveMenuBack('siteondemand'); } } function iframeResize(){ oContainer.style.height = document.getElementById("outer").offsetHeight-document.getElementById("header").offsetHeight-70+'px'; } function callToServer(url, target) { if (!document.createElement) {return true}; var IFrameDoc; if(IFrameObj){ // Iframe bestaat, verwijderen en nieuwe aanmaken oIframe = document.getElementById("_iframe"); oIframe.parentNode.removeChild( oIframe ); } if (document.createElement) { // create the IFrame and assign a reference to the // object to our global variable IFrameObj. try { var tempIFrame=document.createElement('iframe'); tempIFrame.setAttribute('id','_iframe'); tempIFrame.style.border='none'; tempIFrame.style.width='100%'; tempIFrame.style.height='100%'; tempIFrame.frameBorder="0"; if(window.addEventListener){ // Mozilla tempIFrame.addEventListener('load', iframeLoadCallback, false) tempIFrame.addEventListener("load", iframeResize, false); window.addEventListener('resize', iframeResize, false); } else if (window.attachEvent){ // IE tempIFrame.attachEvent("onload", iframeLoadCallback); tempIFrame.attachEvent("onresize", iframeResize); window.attachEvent("onresize", iframeResize); } IFrameObj = oContainer.appendChild(tempIFrame); if (document.frames) { // this is for IE5 Mac, because it will only // allow access to the document object // of the IFrame if we access it through // the document.frames array IFrameObj = document.frames['_iframe']; } } catch(exception) { // This is for IE5 PC, which does not allow dynamic creation // and manipulation of an iframe object. Instead, we'll fake // it up by creating our own objects. iframeHTML='