function checkForm(theForm) {	
	
	// geslacht
	if (eval(theForm.geslacht[0].checked) == false && eval(theForm.geslacht[1].checked) == false) { 
		alert("Geen geslacht opgegeven.");
		return (false);
	}
	
	// voornaam
	if (theForm.voornaam.value=="") { 
		alert("Geen voornaam opgegeven.");
		theForm.voornaam.focus();
		return (false);
	} 	
	
	// achternaam
	if (theForm.achternaam.value=="") { 
		alert("Geen achternaam opgegeven.");
		theForm.achternaam.focus();
		return (false);
	} 
	
	// straat
	if (theForm.straat.value=="") { 
		alert("Geen straat en huisnummer opgegeven.");
		theForm.straat.focus();
		return (false);
	} 
	
	// postcode
	if (theForm.postcode.value=="") { 
		alert("Geen postcode opgegeven.");
		theForm.postcode.focus();
		return (false);
	} 
	
	// woonplaats
	if (theForm.woonplaats.value=="") { 
		alert("Geen woonplaats opgegeven.");
		theForm.woonplaats.focus();
		return (false);
	} 
	
	// leeftijd
	if (theForm.leeftijd.value=="") { 
		alert("Geen leeftijd opgegeven.");
		theForm.leeftijd.focus();
		return (false);
	} 
	
	// telefoon
	if (theForm.telefoon.value=="") { 
		alert("Geen telefoonnummer opgegeven.");
		theForm.telefoon.focus();
		return (false);
	} 
	
	// e-mail
	if (theForm.email.value=="") { 
		alert("Geen e-mail opgegeven.");
		theForm.email.focus();
		return (false);
	} 
	
	// locatie
	if (eval(theForm.locatie[0].checked) == false && 
		eval(theForm.locatie[1].checked) == false && 
		eval(theForm.locatie[2].checked) == false && 
		eval(theForm.locatie[3].checked) == false && 
		eval(theForm.locatie[4].checked) == false && 
		eval(theForm.locatie[5].checked) == false &&
		eval(theForm.locatie[6].checked) == false) { 
		alert("Geen locatie opgegeven.");
		return (false);
	}
	
	// categorie
	if (eval(theForm.categorie[0].checked) == false && 
		eval(theForm.categorie[1].checked) == false) { 
		alert("Geen categorie opgegeven.");
		return (false);
	}
	
	// titel	
	if (theForm.titel.value=="") { 
		alert("Geen titel opgegeven.");
		theForm.titel.focus();
		return (false);
	} 
	
	// materiaal	
	if (theForm.materiaal.value=="") { 
		alert("Geen materiaal opgegeven.");
		theForm.materiaal.focus();
		return (false);
	} 
	
	// afmeting lengte	
	if (theForm.afm_lengte.value=="") { 
		alert("Geen lengte opgegeven.");
		theForm.afm_lengte.focus();
		return (false);
	} 
	
	// afmeting breedte
	if (theForm.afm_breedte.value=="") { 
		alert("Geen breedte opgegeven.");
		theForm.afm_breedte.focus();
		return (false);
	} 
 
	
	// upload afbeelding
	if (theForm.afbeelding_werk.value=="") { 
		alert("Geen afbeelding opgegeven.");
		return (false);
	} 

	return true;
}

function ismaxlength(obj){
	var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
	if (obj.getAttribute && obj.value.length>mlength)
	obj.value=obj.value.substring(0,mlength)
}