function validmail(str) {
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	if (filter.test(str)) {
		return true;
	}
}

function contact_check(){
	if (!document.contact.naam.value) {
		alert("Vul uw naam in...");
		document.contact.naam.focus();
		return false;
	}
	if (!validmail(document.contact.email.value)) {
		alert("Vul een geldig e-mailadres in...");
		document.contact.email.focus();
		return false;
	}
	if (!document.contact.organisatie.value) {
		alert("Vul uw organisatie in...");
		document.contact.organisatie.focus();
		return false;
	}
	if (!document.contact.adres.value) {
		alert("Vul uw adres in...");
		document.contact.adres.focus();
		return false;
	}
	if (!document.contact.pc_plaats.value) {
		alert("Vul uw postcode en plaats in...");
		document.contact.pc_plaats.focus();
		return false;
	}
	return true;
}

function event_check(){
	if (!document.events.naam.value) {
		alert("Vul uw naam in...");
		document.events.naam.focus();
		return false;
	}
	if (!validmail(document.events.email.value)) {
		alert("Vul een geldig e-mailadres in...");
		document.events.email.focus();
		return false;
	}	
	if (!document.events.organisatie.value) {
		alert("Vul uw organisatie in...");
		document.events.organisatie.focus();
		return false;
	}
	if (!document.events.adres.value) {
		alert("Vul uw adres in...");
		document.events.adres.focus();
		return false;
	}
	if (!document.events.pc_plaats.value) {
		alert("Vul uw postcode en plaats in...");
		document.events.pc_plaats.focus();
		return false;
	}
	if (!document.events.telefoon.value) {
		alert("Vul uw telefoonnummer in...");
		document.events.telefoon.focus();
		return false;
	}
	return true;
}

function referentie_check(){
	if (!document.referentie.naam.value) {
		alert("Vul uw naam in...");
		document.referentie.naam.focus();
		return false;
	}
	if (!validmail(document.referentie.email.value)) {
		alert("Vul een geldig e-mailadres in...");
		document.referentie.email.focus();
		return false;
	}
	if (!document.referentie.organisatie.value) {
		alert("Vul uw organisatie in...");
		document.referentie.organisatie.focus();
		return false;
	}
	if (!document.referentie.functie.value) {
		alert("Vul uw functie in...");
		document.referentie.functie.focus();
		return false;
	}
	if (!document.referentie.ervaring1.value) {
		alert("Vul uw algemene ervaring in...");
		document.referentie.ervaring1.focus();
		return false;
	}
	return true;
}

function quiz_check(){
	if (!document.quiz.naam.value) {
		alert("Vul uw naam in...");
		document.quiz.naam.focus();
		return false;
	}
	if (!validmail(document.quiz.email.value)) {
		alert("Vul een geldig e-mailadres in...");
		document.quiz.email.focus();
		return false;
	}
	return true;
}