function validate_email(field,alerttxt)
{
with (field)
  {
  apos=value.indexOf("@");
  dotpos=value.lastIndexOf(".");
  if (apos<1||dotpos-apos<2)
    {alert(alerttxt);return false;}
  else {return true;}
  }
}
function validate_us(field,alerttxt)
{
with (field)
  {
  if (value==null || value=="" || value=="Name" || value=="Message")
    {
    alert(alerttxt);return false;
    }
  else
    {
    return true;
    }
  }
}
function validate_form(thisform)
{
with (thisform)
  {
  if (validate_us(name,"Vul a.u.b. een naam in!")==false)
    {name.focus();return false;}
  if (validate_email(email,"Vul a.u.b. een geldig e-mailadres in!")==false)
    {email.focus();return false;}
  if (validate_us(bericht,"Het veld 'bericht' is verplicht!")==false)
    {name.focus();return false;}	
  }
}

