var regexp = / /g;

function controleformulier(){
	myForm = document.forms['form2'];
	if ((myForm.aanhef[0].checked == false) && (myForm.aanhef[1].checked == false)) {
		alert('Kies alstublieft uw aanhef.');
		return false;
	}
	if (myForm.achternaam.value.replace(regexp,"") == "") {
		alert('Vul alstublieft uw achternaam in.');
		myForm.achternaam.focus();
		return false;
	}
	if(myForm.antwoordadres.value==''){
		alert('Vul alstublieft uw e-mailadres in.');
		myForm.antwoordadres.focus();
		return false;
	}
	if (myForm.antwoordadres.value.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1) {
		alert('U heeft een ongeldig e-mailadres ingevuld.');
		myForm.antwoordadres.focus();
		return false;
	}
	return true;
}