
/* function to highlight the background of formfield on error */
function HiLite(fieldname) {
	$(fieldname).style.backgroundColor  = "#ff0000";
	
	}
	
/* function to reset the background color formfield  */
function LoLite(fieldname) {
	$(fieldname).style.backgroundColor  = "#ffffff";
	}

/* Email Validation script */
function ValiderEmail(email){
	var pos=email.indexOf("@");
	var pos2=email.indexOf(".");
	var error=0;
	if (email.length == 0) return false;
	if (pos < 1) error++;
	else  if(email.indexOf(".",pos) < pos+2) error++;
	if (pos2==email.length-1)   error++;
	if (email.indexOf(" ") > 0){
    	return false;
	}
	if (error){
		return false;
	}
	return true;
}

/* check form velden stap 2*/
function startSearch() {
	if ($F('trefwoord').length < 2) {
		 		HiLite('trefwoord');
		 		goodToGo = "no";
  }	else 	{
			$('zoekform').submit();
		}
}


