function RefreshImage(valImageId) { var objImage = document.images[valImageId]; if (objImage == undefined) { return; } var now = new Date(); objImage.src = objImage.src.split('?')[0] + '?x=' + now.toUTCString(); } function verifycontactform() { if (document.forms.contactform.naam.value == "") { alert("U heeft geen naam ingevuld!"); document.forms.contactform.naam.focus(); return (false); } if (document.forms.contactform.email.value == "") { alert("E-mailadres is niet ingevuld!"); document.forms.contactform.email.focus(); return (false); } if (document.forms.contactform.bericht.value == "") { alert("U heeft niets ingevuld!"); document.forms.contactform.bericht.focus(); return (false); } return (true); } function verifymailinglist() { if (document.forms.mailinglistform.name.value == "") { alert("Naam is niet ingevuld!"); document.forms.mailinglistform.name.focus(); return (false); } if (document.forms.mailinglistform.email.value == "") { alert("E-mailadres is niet ingevuld!"); document.forms.mailinglistform.email.focus(); return (false); } var regel=1; var msg=""; if ( document.forms.mailinglistform.email.value.length > 0 ) { if ( ( document.forms.mailinglistform.email.value.length < 6 ) || ( document.forms.mailinglistform.email.value.indexOf("@") < 1 ) || ( document.forms.mailinglistform.email.value.indexOf(".") < 1 ) || ( document.forms.mailinglistform.email.value.indexOf(" ") > 0 ) ) { msg=msg + (regel++) + 'E-mailadres is ongeldig\n'; } } if( msg.length > 0) { alert("Het e-mailadres is van een onjuist formaat!"); document.forms.mailinglistform.email.focus(); return (false); } return (true); } function onlyNumbers(e) { var keynum var keychar var numbercheck if(window.event) // IE { keynum = e.keyCode } else if(e.which) // Netscape/Firefox/Opera { keynum = e.which } keychar = String.fromCharCode(keynum) numbercheck = /\d/ return numbercheck.test(keychar) } function onlyLetters(e) { var keylet var keychar var lettercheck if(window.event) // IE { keylet = e.keyCode } else if(e.which) // Netscape/Firefox/Opera { keylet = e.which } keychar = String.fromCharCode(keylet) lettercheck = /\D/ return lettercheck.test(keychar) } var isNN = (navigator.appName.indexOf("Netscape")!=-1); function autoTab(input,len, e) { var keyCode = (isNN) ? e.which : e.keyCode; var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46]; if(input.value.length >= len && !containsElement(filter,keyCode)) { input.value = input.value.slice(0, len); input.form[(getIndex(input)+1) % input.form.length].focus(); } function containsElement(arr, ele) { var found = false, index = 0; while(!found && index < arr.length) if(arr[index] == ele) found = true; else index++; return found; } function getIndex(input) { var index = -1, i = 0, found = false; while (i < input.form.length && index == -1) if (input.form[i] == input)index = i; else i++; return index; } return true; }