function check_form ()
{
  valid = true; // assume valid

  if (document.born.fname.value.length == 0)
     { valid = false; alert('Your First Name Must be Filled In!');
      document.born.fname.focus();return false; }
  if (document.born.lname.value.length == 0)
     { valid = false; alert('Your Last Name Must be Filled In!');
      document.born.lname.focus();return false; }
  
  if (document.born.address1.value.length > 0 &&
      document.born.address2.value.length == 0)
     { valid = false; alert('Address line 2 Must be Filled In with City, State and Zipcode.');
      document.born.address2.focus(); return false;}

  if (document.born.address1.value.length == 0 &&
      document.born.address2.value.length > 0)
     { valid = false; alert('Address line 1 Must be Filled In with Street Number, Name and Apt(Unit,Suite).');
      document.born.address1.focus(); return false;}

  if (document.born.country.selectedIndex == false )
     { valid = false; alert('Your Country Must be Selected!');
      document.born.country.focus();return false; }

	if (document.born.address1.value.length == 0 &&
		  document.born.phone.value.length == 0 && 
		  document.born.email.value.length == 0 &&
      document.born.tocontact.checked)
     { valid = false; alert('You are requesting that may our staff ministers contact you \nThen your ADDRESS or PHONE or EMAIL Must be Filled In!');
      document.born.phone.focus();return false; }

  if (!document.born.reason[0].checked &&
		  !document.born.reason[1].checked)
     { valid = false; alert('Accepting Jesus as your Lord and Savior or \nRededicating your life to Jesus Christ Must  be Selected!');
      document.born.reason[0].focus();return false; }

  if (document.born.email.value.length > 0)
	 {valid = VerifyEmailaddress1();}

  if (valid)
        {
      alert("Please be patient while your form is processed. \n" +
			"DO NOT CLICK SUBMIT AGAIN, \n" + 
		    "It can result in a duplicate information." +
			"\n\n Click OK to Continue.");

			document.born.subject.value = document.born.subject.value + document.born.lname.value + ", " + document.born.fname.value;

			if (document.born.reason[0].checked){document.born.reasonx.value = "I am accepting Jesus as my Lord and Savior";}
			if (document.born.reason[1].checked){document.born.reasonx.value = "I am rededicating my life to Jesus Christ";}
			if (document.born.interested[0].checked){document.born.interestedx.value = "New Believers Class";}
			if (document.born.interested[1].checked){document.born.interestedx.value = "Advanced Christian Bible Training ";}

			if (document.born.tocontact.checked){document.born.tocontactx.value = "YES";}

      document.born.submit();
      return true;

        }
   document.born.email.focus();
   return false;
}


function VerifyEmailaddress1()
{
  var Reason  = "Your Email address1 appears incorrect.  \n\nPlease check. \n\nReason:"
  var Success = "Email address1 entered Correctly!"
  var checkStr = document.born.email.value;
  var ix = (checkStr.length - 4)
  var RC = true;
  var x = AtSignValid = DoublePeriod = PeriodValid = SpaceValid = ExtValid = RL = 0;

  for (i = 0;  i < checkStr.length;  i++)
  {
    if (checkStr.charAt(i) == '@')
      AtSignValid++;
    else if (checkStr.charAt(i) == '.')
    {
      if (x == (i-1))
        DoublePeriod++;
      else
      {
        x = i;
        PeriodValid++;
      }
    }
    else if (checkStr.charAt(i) == ' ')
      SpaceValid ++;
  }
  if (checkStr.indexOf(".com", ix) > -1)
    ExtValid++;
  else if (checkStr.indexOf(".edu", ix) > -1)
    ExtValid++;
  else if (checkStr.indexOf(".biz", ix) > -1)
    ExtValid++;
  else if (checkStr.indexOf(".net", ix) > -1)
    ExtValid++;
  else if (checkStr.indexOf(".org", ix) > -1)
    ExtValid++;
  else if (checkStr.indexOf(".gov", ix) > -1)
    ExtValid++;
  else if (checkStr.indexOf(".mil", ix) > -1)
    ExtValid++;
  else if (checkStr.indexOf(".cc", ix) > -1)
    ExtValid++;
  RL = Reason.length;
  if (AtSignValid != 1)
    Reason += "\nOnly one '@' allowed, " + AtSignValid + " found.";
  if (PeriodValid == 0)
    Reason += "\naddress1 must contain at least one period.";
  if (SpaceValid > 0)
    Reason += "\nNo Spaces allowed. address1 contains " + SpaceValid + " space";
  if (SpaceValid > 1)
    Reason += "s.";
  if (checkStr.length > 120)
    Reason += "\nPlease limit the Email address1 to 120 characters.";

  if (RL != Reason.length)
  {
 alert(Reason);
 return false;
  }
  return true;
}
