<!--//
function checkForm(theForm){
	
	if (theForm.FirstName.value == "")
  	{
	    alert("Please enter a value for the \"First Name\" field.");
	    theForm.FirstName.focus();
	    return (false);
  	}
	if (theForm.LastName.value == "")
  	{
	    alert("Please enter a value for the \"Last Name\" field.");
	    theForm.LastName.focus();
	    return (false);
  	}
	
	if (theForm.EmailAddress.value == "")
  	{
	    alert("Please enter a value for the \"Email Address\" field.");
	    theForm.EmailAddress.focus();
	    return (false);
  	}

  	if (theForm.EmailAddress.value.length > 100)
	{
	    alert("Please enter at most 100 characters in the \"Email Address\" field.");
	    theForm.EmailAddress.focus();
	    return (false);
	}

	var temp	 = theForm.EmailAddress.value;
	var AtSym    = temp.indexOf('@');
	var Period   = temp.lastIndexOf('.');
	var Space    = temp.indexOf(' ');
	var Length   = temp.length - 1;   // Array is from 0 to length-1

	if ((AtSym < 1) ||                     // '@' cannot be in first position
   	 (Period <= AtSym+1) ||             // Must be atleast one valid char btwn '@' and '.'
   	 (Period == Length ) ||             // Must be atleast one valid char after '.'
   	 (Space  != -1))                    // No empty spaces permitted
   {  
      alert("You must enter a valid email address for the \"Email Address\" field.");
      theForm.EmailAddress.focus();
	  return (false);
   }
	
	if (theForm.AreaCode.value == "")
  	{
	    alert("Please enter a value for the \"Area Code\" field.");
	    theForm.AreaCode.focus();
	    return (false);
  	}
	if (theForm.Phone.value == "")
  	{
	    alert("Please enter a value for the \"Phone Number\" field.");
	    theForm.Phone.focus();
	    return (false);
  	}
	
	var checkOK = "0123456789 ";
	var checkStr = theForm.AreaCode.value;
	var allValid = true;
	var decPoints = 0;
	var allNum = "";
	for (i = 0;  i < checkStr.length;  i++)
	{
	 ch = checkStr.charAt(i);
	 for (j = 0;  j < checkOK.length;  j++)
	   if (ch == checkOK.charAt(j))
	     break;
	 if (j == checkOK.length)
	 {
	   allValid = false;
	   break;
	 }
	 allNum += ch;
	}
	if (!allValid)
	{
	 alert("Only digits, dashes, and parentheses are valid characters for the \"Area Code\" field.");
	 theForm.AreaCode.focus();
	 return (false);
	}
	
	var checkOK = "0123456789- ";
	var checkStr = theForm.Phone.value;
	var allValid = true;
	var decPoints = 0;
	var allNum = "";
	for (i = 0;  i < checkStr.length;  i++)
	{
	 ch = checkStr.charAt(i);
	 for (j = 0;  j < checkOK.length;  j++)
	   if (ch == checkOK.charAt(j))
	     break;
	 if (j == checkOK.length)
	 {
	   allValid = false;
	   break;
	 }
	 allNum += ch;
	}
	if (!allValid)
	{
	 alert("Only digits, dashes, and parentheses are valid characters for the \"Phone Number\" field.");
	 theForm.Phone.focus();
	 return (false);
	}
   
  
  //if (theForm.County[theForm.County.selectedIndex].value == "")
  //{
  //	alert("Please select the county where you live.");
//	theForm.County.selectedIndex = 0;
  //  theForm.County.focus();
   // return (false);
  //}
  
  
  if (theForm.AddressLine1.value == "")
  {
	 alert("Please enter a value for the \"Address\" field.");
	 theForm.AddressLine1.focus();
	 return (false);
  }
  
  if (theForm.City.value == "")
  {
	 alert("Please enter a value for the \"City\" field.");
	 theForm.City.focus();
	 return (false);
  }
  if (theForm.State.value == "")
  {
	 alert("Please enter a value for the \"State\" field.");
	 theForm.State.focus();
	 return (false);
  }
  if (theForm.City.value == "")
  {
	 alert("Please enter a value for the \"City\" field.");
	 theForm.City.focus();
	 return (false);
  }
  if (theForm.GrossIncome.value == "")
  {
	 alert("Please enter a value for the \"Gross Income\" field.");
	 theForm.GrossIncome.focus();
	 return (false);
  }
 	
}

//-->