
function isEmpty(fieldId) {
	if(document.getElementById(fieldId).value=="") {
		return true;
	} else {
		return false;
	}
}

function setFocus(fieldId) {
	document.getElementById(fieldId).focus();
}

function checkContactForm() {
	
	var sendForm = true;
	 setSave();
	if(sendForm && isEmpty('contactName')) {
		var sendForm = false;
		alert('Uw naam is niet ingevuld.');
		setFocus('contactName');
	}
	if(sendForm && isEmpty('contactEmail')) {
		var sendForm = false;
		alert('UW emailadres is niet ingevuld.');
		setFocus('contactEmail');
	}
	
	if(sendForm && isEmpty('contactMsg')) {
		var sendForm = false;
		alert('U heeft geen bericht ingevuld.');
		setFocus('contactMsg');
	}
	
	if(sendForm) {
		document.forms['contactForm'].submit();
	} else {
		return false;
	}
	
	
}
function setSave() {
		document.getElementById('spamBot').value = "no";
	}
