// JavaScript Document
function Form_Validator(theForm)
{

  if (theForm.FirstName.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.FirstName.focus();
    return (false);
  }

 
  if (theForm.Title.value == "")
  {
    alert("Please enter a value for the \"Job Title\" field.");
    theForm.Title.focus();
    return (false);
  }


  if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.Email.value)){
	}
	else{
	alert("Invalid E-mail Address! Please re-enter.");
	theForm.Email.focus();
	return (false);
	}


  if (theForm.Phone.value == "")
  {
    alert("Please enter a value for the \"Phone\" field.");
    theForm.Phone.focus();
    return (false);
  }

  if (theForm.Company.value == "")
  {
    alert("Please enter a value for the \"Company\" field.");
    theForm.Company.focus();
    return (false);
  }


  if (theForm.Business.selectedIndex < 0)
  {
    alert("Please select one of the \"My business is best described...\" options.");
    theForm.Business.focus();
    return (false);
  }

  if (theForm.Business.selectedIndex == 0)
  {
    alert("The first \"My business is best described...\" option is not a valid selection.  Please choose one of the other options.");
    theForm.Business.focus();
    return (false);
  }

 
  if (theForm.Assets.selectedIndex < 0)
  {
    alert("Please select one of the \"Assets under management\" options.");
    theForm.Assets.focus();
    return (false);
  }

  
 
  if (theForm.HearAbtCogency.selectedIndex < 0)
  {
    alert("Please select one of the \"How did you hear...\" options.");
    theForm.HearAbtCogency.focus();
    return (false);
  }

  if (theForm.HearAbtCogency.selectedIndex == 0)
  {
    alert("The first \"How did you hear...\" option is not a valid selection.  Please choose one of the other options.");
    theForm.HearAbtCogency.focus();
    return (false);
  }

  
  if (theForm.Comments.value.length > 255)
  {
    alert("Please enter at most 255 characters in the \"Comments and questions\" field.");
    theForm.Comments.focus();
    return (false);
  }
  return (true);
}