// JavaScript Document
window.onerror = stopError
function stopError() {
// return true;
}
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 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=="contact"){
if (document.getElementById("naam").value=='') var valid = 'no';
if (isValidEmail(document.getElementById("email").value)==false) var valid = 'no';
if (document.getElementById("vraag").value=='') var valid = 'no';
if (document.getElementById("bedrijf").value=='') var valid = 'no';
} else if(which=="vacatures"){
//Check
var aantal_uploads = document.getElementById("aantal_uploads").value;
for(i=1;i<=aantal_uploads;i++) {
thisfield = document.getElementById("userfile_" + i).value;
thisfield2 = document.getElementById("userfilename_" + i).value;
if(thisfield=="" || thisfield2=="") {
valid = 'no';
}
}
if (document.getElementById("naam").value=='') var valid = 'no';
if (isValidEmail(document.getElementById("email").value)==false) var valid = 'no';
if (document.getElementById("telefoon").value=='') var valid = 'no';
if (document.getElementById("bericht").value=='') var valid = 'no';
}
//If ok, then submit
if (valid == "yes") {
document.home_form.action+="&show_mail=yes&do_mail=yes&which="+which;
document.home_form.submit(document.home_form);
} else {
alert("Please fill in all required fields");
}
}
function doSearch(){
//Init
var valid = "yes";
//Check
if (document.getElementById("zoeken_waar").value=="") var valid = 'no';
if (document.getElementById("searchitem").value=="") var valid = 'no';
//If ok, then submit
if (valid == "yes") {
document.home_form.action+="&doSearch=yes&where="+document.getElementById("zoeken_waar").value;
document.home_form.submit(document.home_form);
} else {
alert("Please fill in all required fields");
}
}
function isDefined(obj){
varToStr=eval("'"+obj+"'");
if(varToStr=="undefined") return false;
else return true;
}
var printWin = null;
function doPrint(elem){
var w = "630";
var h = "400";
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,resizable';
url = "
![]() |
| "+text+" |