<!--
function Form_Validator_Side_Form(theForm)
{
  if (theForm.FirstName.value == "")
  {
    alert("Please enter your \"First Name\".");
    theForm.FirstName.focus();
    return (false);
  }
  
  if (theForm.LastName.value == "")
  {
    alert("Please enter your \"Last Name\".");
    theForm.LastName.focus();
    return (false);
  }
  /*
  if (theForm.Address1.value == "")
  {
    alert("Please enter your \"Address\".");
    theForm.Address1.focus();
    return (false);
  }
    
  if (theForm.City.value == "")
  {
    alert("Please enter your \"City\".");
    theForm.City.focus();
    return (false);
  }

  if (theForm.Zip.value == "")
  {
    alert("Please enter your \"Zip Code\".");
    theForm.Zip.focus();
    return (false);
  }
  */
  if (theForm.Email.value == "")
  {
    alert("Please enter your \"E-mail Address\".");
    theForm.Email.focus();
    return (false);
   }
  else
  {
    //  Validate Personal Email Address
  	    var email = theForm.Email
		var name = "E-mail Address"
		var fncReturn = Email_Validator(email , name)
		if (fncReturn == false)
		{
		theForm.Email.focus();
        return (false);
		}
   }
   
  if (theForm.Email2.value == "")
  {
    alert("Please enter your \"Confirm E-mail Address\".");
    theForm.Email2.focus();
    return (false);
   }
  else
  {
    //  Validate Personal Email Address
  	    var email = theForm.Email
		var name = "E-mail Address"
		var fncReturn = Email_Validator(email , name)
		if (fncReturn == false)
		{
		theForm.Email2.focus();
        return (false);
		}
   }
   
  if (theForm.Email.value != theForm.Email2.value)
  {
    alert("The confirm e-mail address does not match!");
    theForm.Email2.focus();
    return (false);
   } 
   
  if (theForm.StateProvince.value == "")
  {
    alert("Please enter your \"State or Province\".");
    theForm.StateProvince.focus();
    return (false);
  }
  
  if (theForm.PhoneDay.value == "")
  {
    alert("Please enter a \"Phone Number\" for your \"Day Phone\".\nIf your \"Day Phone Number\" is the same as your \"Evening Phone Number\"\nThen please enter the same number for both \"Day and Evening\".");
    theForm.PhoneDay.focus();
    return (false);
  }
  
  if (theForm.PhoneDay.value != "")
  {
  	if (!isPhone(theForm.PhoneDay))
	{
	    theForm.PhoneDay.focus();
    	return (false);
	}
  }
  
  if (theForm.PhoneEvening.value == "")
  {
    alert("Please enter a \"Phone Number\" for your \"Evening Phone\".\nIf your \"Evening Phone Number\" is the same as your \"Day Phone Number\"\nThen please enter the same number for both \"Day and Evening\".");
    theForm.PhoneEvening.focus();
    return (false);
  }
  
  if (theForm.PhoneEvening.value != "")
  {
  	if (!isPhone(theForm.PhoneEvening))
	{
	    theForm.PhoneEvening.focus();
    	return (false);
	}
  }
  
  if (theForm.TimeZone.value == "")
  {
    alert("Please select a \"Time Zone\".");
    theForm.TimeZone.focus();
    return (false);
  }
  
  if (theForm.BestTime.value == "")
  {
    alert("Please select the \"Best time to reach you\".");
    theForm.BestTime.focus();
    return (false);
  }
  /*
  if (theForm.InterestLevel.value == "")
  {
    alert("Please select \"What are you most interested in\".");
    theForm.InterestLevel.focus();
    return (false);
  }
  
  if (theForm.MoneyGoal.value == "")
  {
    alert("Please select \"How much money would you like to generate\".");
    theForm.MoneyGoal.focus();
    return (false);
  }
  
  if (theForm.HoursPerWeek.value == "")
  {
    alert("Please select \"How much Time You Have to Spend on Your Business\".");
    theForm.HoursPerWeek.focus();
    return (false);
  }
  */
  if (theForm.Over18.checked == false)
  {
    alert("Please certify that you are \"18 years old or older\".");
    theForm.Over18.focus();
    return (false);
  }

  AssignURL(theForm);
  
  return (true);
}


// Check to make sure there are 7, 10 or 11 digits in a phone number
// Dependent functions "stripCharsInBag(), isInteger(), isEmpty(), isDigit().
function isPhone(objPhoneNumber){
	var iPhoneNumberValue = objPhoneNumber.value;
	iPhoneNumberValue = stripCharsInBag(iPhoneNumberValue, "()- ");
	if (iPhoneNumberValue.length != 10){
		alert("All phone numbers must at least 10 digits long. \nThis includes your 3 digit area code and 7 didgit phone number.");
		return(false);
	}
	if (isInteger(iPhoneNumberValue)){
		if (iPhoneNumberValue.length == 10){
			iPhoneNumberValue = iPhoneNumberValue.substring(0,3) + "-" + iPhoneNumberValue.substring(3,6) + "-" + iPhoneNumberValue.substring(6,10);
			objPhoneNumber.value = iPhoneNumberValue;
		}else{
		alert('The \"Phone Number\" is not valid and/or contains invalid characters!');
		return(false);
		}
	}
	 return(true);
}

// Removes all characters which appear in string bag from string s.
// Example stripCharsInBag(s, ",.- ") this would remove a comma, period,
// hyphen and a space
function stripCharsInBag (s, bag){   
	var i;
    var returnString = "";

    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.

    for (i = 0; i < s.length; i++) {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}


// Checks to see if the value is an Integer
// Dependent functions are "isEmpty, isDigit"
function isInteger(s){
   var i;

    if (isEmpty(s)){ 
       if (isInteger.arguments.length == 1) {
			return(false);
	   }else{
			return (isInteger.arguments[1] == true);
	   }
	}
    // Search through the string checking each character one by one
    // until we find a non-numeric character.
    // If a NON numeric character is found then return false;
	// otherwise return true.

    for (i = 0; i < s.length; i++){   
        // Check that current character is number.
        var c = s.charAt(i);
        if (!isDigit(c)) {
			return(false);
		}
    }
    // All characters are numbers.
    return(true);
}

// Check whether string s is empty.
function isEmpty(s){   
	return ((s == null) || (s.length == 0))
}

// Returns true if character c is a digit 
// (0 .. 9).
function isDigit(c){ 
	 return ((c >= "0") && (c <= "9"))
}

//-->
