function numbersonly(e, decimal) {
	var key;
	var keychar;
	if (window.event) 	{
 		key = window.event.keyCode;
	}
	else if (e) {
   		key = e.which;
	}
	else {
   		return true;
	}
	keychar = String.fromCharCode(key);

	if ((key==null) || (key==0) || (key==8) ||  (key==9) || (key==13) || (key==27) ) {
   		return true;
	}
	else if ((("0123456789").indexOf(keychar) > -1)) {
   		return true;
	}
	else if (decimal && (keychar == ".")) { 
		return true;
	}
	else {	
		return false;
	}
}

function notEmptyContact() {
	var fout = true;
	var naamContact = document.getElementById('contact').naamContact.value;
	var adresContact = document.getElementById('contact').adresContact.value;
	var postcodeContact = document.getElementById('contact').postcodeContact.value;
	var woonplaatsContact = document.getElementById('contact').woonplaatsContact.value;
	var telefoonnummerContact = document.getElementById('contact').telefoonnummerContact.value;
	
	if (naamContact == "")	{
		document.getElementById('naamContact').style.borderColor = "#E33928";
		fout = false; 
	}
	else { 
		document.getElementById('naamContact').style.borderColor = "#666666"; 
	}
	if (adresContact == "" || adresContact == "straat huisnummer")	{
		document.getElementById('adresContact').style.borderColor = "#E33928";
		fout = false; 
	}
	else { 
		document.getElementById('adresContact').style.borderColor = "#666666"; 
	}
	if (postcodeContact == "" || postcodeContact.length < 6 || postcodeContact == "1111AA" )	{
		document.getElementById('postcodeContact').style.borderColor = "#E33928";
		fout = false; 
	}
	else { 
		document.getElementById('postcodeContact').style.borderColor = "#666666"; 
	}
	if (woonplaatsContact == "")	{
		document.getElementById('woonplaatsContact').style.borderColor = "#E33928";
		fout = false; 
	}
	else { 
		document.getElementById('woonplaatsContact').style.borderColor = "#666666"; 
	}
	if (telefoonnummerContact == "" || telefoonnummerContact.length < 6 || telefoonnummerContact == "0612345678")	{
		document.getElementById('telefoonnummerContact').style.borderColor = "#E33928";
		fout = false; 
	}
	else { 
		document.getElementById('telefoonnummerContact').style.borderColor = "#666666"; 
	}
	
	return fout;
}
