function ValidateForm367018881(){ var flag = true; var message = 'U moet alle verplichte velden invullen!'; if(http.readyState == 4) { var showcheck = http.responseText; if (showcheck=='0') { message = 'Foutieve verificatie code!'; flag = false; }; if (document.ContactForm367018881.field4455.value.length==0){ flag = false; }; if (document.ContactForm367018881.field4459.value.length==0){ flag = false; }; if (document.ContactForm367018881.field4460.value.length==0){ flag = false; }; if (flag == false) { alert(message); } else { document.ContactForm367018881.submit(); }; }; };function createRequestObject(){ try { xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {alert('Sorry, but your browser doesn\'t support XMLHttpRequest.'); }; return xmlhttp; }; var http = createRequestObject(); function CheckForm367018881() { var captchacheck = document.ContactForm367018881.captchacode.value; var url = '/form_gen/captcha-process.php?captcha=' + captchacheck; http.open('GET', url, true); http.onreadystatechange = ValidateForm367018881; http.send(null); };