// JavaScript Document
function checkContactForm(form)
{
	var fouten = "Please fill in the following fields:\n\n";
	var fout = false;
	
		if (form.first_name.value == "")
		{
	   fout = true;
	   fouten = fouten + "First name\n";
    }
    
    if(form.mobile.value != "")
    {
		    if(form.mobile.value.toString().length < 11)
		    {
		        fout = true;
		        fouten = fouten + "The contact nr is incorrect\n";
		    } else
		    if(!check("", form.mobile.value, 2))
		    {
		        fout = true;
		        fouten = fouten + "The contact nr is incorrect\n";
		    }
    }
    
    if(form.email.value == "")
    {
        fout = true;
        fouten = fouten + "Email addresss\n";
    } else
    if(!check(form.email.value, "", 1))
    {
        fout = true;
        fouten = fouten + "The email addresss is incorrect\n";
    }
    
	if (form.message.value == "")
	{
	   fout = true;
	   fouten = fouten + "Please type a message\n";
    }
    
	if (fout)
		alert(fouten);
	else
		form.submit();
}
