// JavaScript Document
function checkForm(	notEmptyFields, formid ) {
	if (formid==null) { formid = ""; } else { formid = "_"+formid; }
	var letop = document.getElementById("letop"+formid);
	var error = document.getElementById("error"+formid);

	var valid = true;
	//
	for (i=0; i<notEmptyFields.length; i++) { 
		// document.getElementById(notEmptyFields[i]).className = "";
		// document.getElementById(notEmptyFields[i]).onfocus = function() {};

	if (document.getElementById(notEmptyFields[i]).value=="") {
		if (valid) {
			// Geef het eerste foute veld focus
			document.getElementById(notEmptyFields[i]).focus();
		}
		document.getElementById(notEmptyFields[i]).className = "inputerror";
		valid = false;
	} 
	else {
		document.getElementById(notEmptyFields[i]).className = "";    	
	}
} 

	if (error!=null) {
		error.style.display = "none"; 
	}

	if (letop!=null) {
	if (!valid) { 
		// document.getElementById("letop").style.visibility = "visible";
		letop.style.display = "block"; 
		}
		else {
		// document.getElementById("letop").style.visibility = "hidden";
		letop.style.display = "none"; 
		}
	}
	return (valid);
}