function Validator(theForm)
{

  	if (!format_phones(theForm.Phone)) { 
		return false;
	}

	if (!emailChecking(theForm.Email)) { 
		return false;
	}

	if (!format_zipcodes(theForm.ZipCode)) { 
		return false;
	}
	
	if (theForm.FirstName.value == "")  
	{
	  alert("The \"First Name\" field is required.");
	  theForm.FirstName.focus();
	  return (false);
	}


	if (theForm.LastName.value == "") 
	{
	  alert("The \"Last Name\" field is required.");
	  theForm.LastName.focus();
	  return (false);
	}
	if (theForm.City.value == "") 
	{
	  alert("The \"City\" field is required.");
	  theForm.City.focus();
	  return (false);
	}

	if (theForm.State.selectedIndex == 0)
	{
	  alert("The \"State\" option is not a valid selection.  Please choose one of the other options.");
	  theForm.State.focus();
	  return (false);
	}

	if (theForm.ZipCode.value == "") 
	{
	  alert("The \"Zip Code\" field is required.");
	  theForm.ZipCode.focus();
	  return (false);
	}
	
	if (theForm.DOBMonth.value.toUpperCase() == "XX")
	{
		alert("Please select a Month value for \"Date of Birth\".");
		theForm.DOBMonth.focus();
		return false;
	}
	
	if (theForm.DOBDay.value.toUpperCase() == "XX")
	{
		alert("Please select a Day value for \"Date of Birth\".");
		theForm.DOBDay.focus();
		return false;
	}
		
	if (theForm.DOBYear.value == '')
	{
		alert("Please enter a Year value for \"Date of Birth\".");
		theForm.DOBYear.focus();
		return false;
	}	
	
	var dtdob = theForm.DOBMonth.value + "/" + theForm.DOBDay.value + "/" + theForm.DOBYear.value;
	if (!isDateValue(dtdob))
	{
		alert("Please enter valid \Date of Birth\ value.");
		theForm.DOBMonth.focus();
		return false;			
	} else {
			if (theForm.DOBYear.value.length != 4) {
				alert("Please enter \"Year of Birth\" as \"yyyy\".");
				theForm.DOBYear.focus();
				return false;					
			}
	}
	
	if (theForm.Email.value == "") 
	{
	  alert("The \"Email\" field is required.");
	  theForm.Email.focus();
	  return (false);
	}
	
	
	if (theForm.Phone.value == "") 
	{
	  alert("The \"Telephone\" field is required.");
	  theForm.Phone.focus();
	  return (false);
	}

	if (theForm.Employees.selectedIndex == 0)
	{
	  alert("The \"Employees\" option is not a valid selection.  Please choose one of the other options.");
	  theForm.Employees.focus();
	  return (false);
	}

	blnNoInterestOptionSelected = true;
	for (x=0; x<=theForm.Interest.length -1; x++) { 
		if (theForm.Interest[x].checked) { 
			blnNoInterestOptionSelected = false
			break
		} 
	} 

	if (blnNoInterestOptionSelected) { 
	  alert("\"I Would Like More Information About\" is required.");
	  theForm.Interest[0].focus();
	  return (false);
	} 	
	
  return (true);
}
// ===============================================================
function isDateValue(sDate) {
   var re = /^\d{1,2}\/\d{1,2}\/\d{4}$/
   if (re.test(sDate)) {
      var dArr = sDate.split("/");
      var d = new Date(sDate);
      return d.getMonth() + 1 == dArr[0] && d.getDate() == dArr[1] && d.getFullYear() == dArr[2];
   }
   else {
      return false;
   }
}


// ===============================================================
function clearYearInput(textObj){

  if (textObj.value == "Year"){
    textObj.value= ""
  }

}