/****************************** EMAIL CHECK ******************************/ function checkEmail(emailAddress) { var foundAtSymbol = 0; var foundDot = 0; var md; for (var x=0; x 0 && foundAtSymbol == 1) { return true; } else{ return false; } } /****************************** FORM CHECK ******************************/ function checkForm(){ d = document.getElementById("sendOrder"); if(d.customerFirstName.value==''){ alert('U moet uw voornaam invullen!'); d.customerFirstName.focus(); return false; } if(d.customerLastName.value==''){ alert('U moet uw achternaam invullen!'); d.customerLastName.focus(); return false; } checked = ''; for (i=0; i < d.customerSex.length; i++) { if (d.customerSex[i].checked) { checked = d.customerSex[i].value; } } if(checked==''){ alert('U moet uw geslacht opgeven!'); return false; } if(d.customerStreet.value==''){ alert('U moet uw straatnaam invullen!'); d.customerStreet.focus(); return false; } if(d.customerHomeNumber.value==''){ alert('U moet uw huisnummer invullen!'); d.customerHomeNumber.focus(); return false; } if(d.customerPostalCode1.value==''){ alert('U moet uw postcode helemaal invullen!'); d.customerPostalCode1.focus(); return false; } if(d.customerPostalCode2.value==''){ alert('U moet uw postcode helemaal invullen!'); d.customerPostalCode2.focus(); return false; } if(d.customerCity.value==''){ alert('U moet uw woonplaats invullen!'); d.customerCity.focus(); return false; } if(d.customerCountry.value==''){ alert('U moet het land waarin u woont opgeven!'); d.customerCountry.focus(); return false; } if(d.customerEmail.value==''){ alert('U moet uw e-mailadres correct invullen!'); d.customerEmail.focus(); return false; } emailAddress = d.customerEmail.value; if(checkEmail(emailAddress)==false){ alert('U moet uw e-mailadres correct invullen!'); d.customerEmail.focus(); return false; } if (d.createPassword.checked) { if(d.customerPassword1.value==''){ alert('U moet een wachtwoord invoeren!!'); d.customerPassword1.focus(); return false; } if(d.customerPassword2.value==''){ alert('U moet het wachtwoord nogmaals invoeren!!'); d.customerPassword2.focus(); return false; } if(d.customerPassword1.value.length < 8){ alert('Uw wachtwoord moet minstens uit 8 tekens bestaan!'); d.customerPassword1.focus(); return false; } if(d.customerPassword1.value != d.customerPassword2.value) { alert('U moet tweemaal hetzelfde wachtwoord invoeren!'); d.customerPassword1.focus(); return false; } } if(d.customerPayment.value==''){ alert('U moet een betalingswijze opgeven!'); d.customerPayment.focus(); return false; } if(d.customerPayment.value == '4'){ if(d.customerBillBank.value==''){ alert('U moet uw rekening opgeven!'); d.customerBillBank.focus(); return false; } if(d.customerBillBankNumber.value==''){ alert('U moet uw rekeningnummer invullen!'); d.customerBillBankNumber.focus(); return false; } checked = ''; for (i=0; i < d.billData.length; i++) { if (d.billData[i].checked) { checked = d.billData[i].value; } } if(checked==''){ alert('U moet opgeven op wiens naam de rekening staat!'); return false; } if(checked=='other'){ if(d.customerBillName.value==''){ alert('U moet de naam van de rekeninghouder invullen!'); d.customerBillName.focus(); return false; } if(d.customerBillStreet.value==''){ alert('U moet de straatnaam van de rekeninghouder invullen!'); d.customerBillStreet.focus(); return false; } if(d.customerBillHomeNumber.value==''){ alert('U moet het huisnummer van de rekeninghouder invullen!'); d.customerBillHomeNumber.focus(); return false; } if(d.customerBillPostalCode1.value==''){ alert('U moet de postcode van de rekeninghouder helemaal invullen!'); d.customerBillPostalCode1.focus(); return false; } if(d.customerBillPostalCode2.value==''){ alert('U moet de postcode van de rekeninghouder helemaal invullen!'); d.customerBillPostalCode2.focus(); return false; } if(d.customerBillCity.value==''){ alert('U moet de woonplaats van de rekeninghouder invullen!'); d.customerBillCity.focus(); return false; } if(d.customerBillCountry.value==''){ alert('U moet opgeven waar de rekeninghouder woont!'); d.customerBillCountry.focus(); return false; } } } if (!d.agreement.checked) { alert('U moet akkoord gaan met de voorwaarden!'); return false; } return true; } function checkPassword() { d = document.getElementById("sendOrder"); if (d.createPassword.checked) { document.getElementById("customerPassword").style.display = "block"; } else { document.getElementById("customerPassword").style.display = "none"; } } /****************************** AUTO TAB ******************************/ function autotab(original,destination){ if (original.getAttribute&&original.value.length==original.getAttribute("maxlength")) { destination.focus() } }