// JavaScript Document
function checkForm(theForm) {
	if (theForm.naam.value=="") { 
		alert("Geen naam opgegeven.");
		theForm.naam.focus();
		return (false);
	} // if
		

	var checkOK = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXY@.-_0123456789";
	var checkStr = theForm.email.value;
	var allValid = true;
	for (i = 0;  i < checkStr.length;  i++) {
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
			if (ch == checkOK.charAt(j))
		break;
		if (j == checkOK.length) {
			allValid = false;
			break;
		} // if
	} // for

	if (checkStr.indexOf("@")<3) allValid = false;
	if (checkStr.length-3<checkStr.lastIndexOf(".")) allValid = false;
	if (checkStr.lastIndexOf(".")<checkStr.indexOf("@")) allValid = false;
	if (!allValid) { 
		alert("Geen geldig e-mail adres opgegeven.");
		theForm.email.focus();
		return (false);
	} // if
	
	theForm.submit();
} // checkForm

function doSubmit() {
	obj = document.getElementById('nieuwsbrief_submit');
	obj.click();
} // doSubmit
