function FrontPage_Form1_Validator(theForm)
{

  if (theForm.name.value == "")
  {
    alert("Please enter a value for the \"name\" field.");
    theForm.name.focus();
    return (false);
  }
  if (theForm.company.value == "")
  {
    alert("Please enter a value for the \"company\" field.");
    theForm.company.focus();
    return (false);
  }
  if (theForm.phone.value == "")
  {
    alert("Please enter a value for the \"phone\" field.");
    theForm.phone.focus();
    return (false);
  }
  if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"E-mail\" field.");
    theForm.email.focus();
    return (false);
  } else {
  	// test for valid email

  	var x = theForm.email.value;
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (filter.test(x)) {
		//alert('YES! Correct email address');
	} else {

		alert("Please enter a valid email address.");
		theForm.email.focus();
		return (false);

	}
  }

  if (theForm.url.value == "")
  {
    alert("Please enter a value for the \"Website URL\" field.");
    theForm.url.focus();
    return (false);
  }

  return (true);
}
