function valid()
	{
		f= document.contactus;
		if(Trim(f.achternaam.value) =="")
		{
			alert("Gelieve te gaan de Achternaam in");
			f.achternaam.focus();
			return false;
		}
		if(Trim(f.emailadres.value) ==""){
			alert("Gelieve te gaan de E-mailAdres in");
			f.emailadres.focus();
			return false;
		}
		if(isEmail(f.emailadres.value) =="")
		{
			alert("Gelieve te gaan een Geldig E-mailAdres in");
			f.emailadres.focus();
			return false;
		}
			
		return true;
	}
function isEmail ( string ) 
{
	if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
		return true;
	else
		return false;
}

function Trim(str)
{   
		  while(str.charAt(0) == (" ") )
		   {  
			str = str.substring(1);
		   }
			 while(str.charAt(str.length-1) == " " )
			   {  
				  str = str.substring(0,str.length-1);
			   }
			  return str;
}	


