function runScripts() {
	if(!document.legalHelp.agree.checked){
		alert("You need to check this to receive the Free video and other valuable offers.");
		return false;
	}
		
	return  ( 
			CheckNull(document.legalHelp.firstname, "First Name") &&
			CheckNull(document.legalHelp.lastname, "Last Name") &&
			CheckNull(document.legalHelp.email, "E-mail") && 
			CheckEmail(document.legalHelp.email) &&
			CheckValidPhoneNumber() &&
			CheckNull(document.legalHelp.address, "Address") && 
			CheckNull(document.legalHelp.city, "City") && 
			CheckNull(document.legalHelp.zip, "Zip") && 
			CheckQuestions()
		)
	}
	
/********************** START CHECK PHONE NUMBER ******************************/
function CheckValidPhoneNumber() {
	var theErrorMessage = "Please enter a valid phone number.\r\n\r\n";
	var theErrorIndex = 0;
	var theAreaCode = document.legalHelp.nightArea.value;
	var theExchange = document.legalHelp.nightPre.value;
	var thePhoneNumber = theAreaCode + theExchange + document.legalHelp.nightEnd.value;
	
	/* Check Phone Number fields for Nulls */
	if ((theAreaCode == null) || (theAreaCode == "")) {
		theErrorIndex++;
		theErrorMessage = theErrorMessage + theErrorIndex + ". Please enter a valid area code.\r\n";
		}
	if ((theExchange == null) || (theExchange == "")) {
		theErrorIndex++;
		theErrorMessage = theErrorMessage + theErrorIndex + ". Please enter a valid exchange number.\r\n";
		}
	if ((document.legalHelp.nightEnd.value == null) || (document.legalHelp.nightEnd.value == "")) {
		theErrorIndex++;
		theErrorMessage = theErrorMessage + theErrorIndex + ". Please enter a valid number.\r\n";
		}
	/* Check 1st character in area code */
	if ((theAreaCode.slice(0,1) == "0") || (theAreaCode.slice(0,1) == "1")) {
		theErrorIndex++;
		theErrorMessage = theErrorMessage + theErrorIndex + ". The first digit of your area code should not be 0 or 1.\r\n";
		}
	/* Check for repeating digits in area code */
	if ((theAreaCode == "222") || (theAreaCode == "333") || (theAreaCode == "444") || (theAreaCode == "555") || (theAreaCode == "666") || (theAreaCode == "777") || (theAreaCode == "999")) {
		theErrorIndex++;
		theErrorMessage = theErrorMessage + theErrorIndex + ". Area code " + theAreaCode + " is invalid.\r\n";
		}
	/* Check exchange for 555 */
	if (theExchange == "555") {
		theErrorIndex++;
		theErrorMessage = theErrorMessage + theErrorIndex + ". Exchange number 555 is invalid.\r\n";
		}
	/* Check for 10 digits in phone number */
	if (thePhoneNumber.length != 10) {
		theErrorIndex++;
		theErrorMessage = theErrorMessage + theErrorIndex + ". Your phone number must contain 10 digits.\r\n";
		}
		
	if (theErrorMessage != "Please enter a valid phone number.\r\n\r\n") {
		alert(theErrorMessage);
		document.legalHelp.nightArea.value = "";
		document.legalHelp.nightPre.value = "";
		document.legalHelp.nightEnd.value = "";
		document.legalHelp.nightArea.focus();
		return false;
		}
	else {
		return true;
		}
	}
/********************** END CHECK PHONE NUMBER ******************************/

/********************** END CHECK PHONE NUMBER ******************************/

function dayNumber() {
	var iArea = document.legalHelp.dayArea.value;
	var iPre = document.legalHelp.dayPre.value;
	var iEnd = document.legalHelp.dayEnd.value;

if (((iArea == "") || (iArea == null)) && 
    ((iPre == "") || (iPre == null)) && 
    ((iEnd == "") || (iEnd == null))) 
{
  return true;
}
else {
  if (CheckDayValidPhoneNumber()) {
	return true;
  }
  else {
    return false;
  }
}

}

function CheckDayValidPhoneNumber() {
	var theErrorMessage = "Please enter a valid phone number.\r\n\r\n";
	var theErrorIndex = 0;
	var theAreaCode = document.legalHelp.dayArea.value;
	var theExchange = document.legalHelp.dayPre.value;
	var thePhoneNumber = theAreaCode + theExchange + document.legalHelp.dayEnd.value;
	
	/* Check Phone Number fields for Nulls */
	if ((theAreaCode == null) || (theAreaCode == "")) {
		theErrorIndex++;
		theErrorMessage = theErrorMessage + theErrorIndex + ". Please enter a valid area code.\r\n";
		}
	if ((theExchange == null) || (theExchange == "")) {
		theErrorIndex++;
		theErrorMessage = theErrorMessage + theErrorIndex + ". Please enter a valid exchange number.\r\n";
		}
	if ((document.legalHelp.dayPre.value == null) || (document.legalHelp.dayPre.value == "")) {
		theErrorIndex++;
		theErrorMessage = theErrorMessage + theErrorIndex + ". Please enter a valid exchange number.\r\n";
		}
	/* Check 1st character in area code */
	if ((theAreaCode.slice(0,1) == "0") || (theAreaCode.slice(0,1) == "1")) {
		theErrorIndex++;
		theErrorMessage = theErrorMessage + theErrorIndex + ". The first digit of your area code should not be 0 or 1.\r\n";
		}
	/* Check for repeating digits in area code */
	if ((theAreaCode == "222") || (theAreaCode == "333") || (theAreaCode == "444") || (theAreaCode == "555") || (theAreaCode == "666") || (theAreaCode == "777") || (theAreaCode == "999")) {
		theErrorIndex++;
		theErrorMessage = theErrorMessage + theErrorIndex + ". Area code " + theAreaCode + " is invalid.\r\n";
		}
	/* Check exchange for 555 */
	if (theExchange == "555") {
		theErrorIndex++;
		theErrorMessage = theErrorMessage + theErrorIndex + ". Exchange number 555 is invalid.\r\n";
		}
	/* Check for 10 digits in phone number */
	if (thePhoneNumber.length != 10) {
		theErrorIndex++;
		theErrorMessage = theErrorMessage + theErrorIndex + ". Your phone number must contain 10 digits.\r\n";
		}
		
	if (theErrorMessage != "Please enter a valid phone number.\r\n\r\n") {
		alert(theErrorMessage);
		document.legalHelp.dayArea.value = "";
		document.legalHelp.dayPre.value = "";
		document.legalHelp.dayEnd.value = "";
		document.legalHelp.dayArea.focus();
		return false;
		}
	else {
		return true;
		}
	}
/********************** END CHECK PHONE NUMBER ******************************/

function CheckQuestions() 
	{
		if (document.legalHelp.state.options[document.legalHelp.state.selectedIndex].value == "")
			{
				alert("Please select a state");
				document.legalHelp.state.focus();
				return false;
			}	
		if (document.legalHelp.timetocall.options[document.legalHelp.timetocall.selectedIndex].value == "")
			{
				alert("Please select the best time we can call you");
				document.legalHelp.timetocall.focus();
				return false;
			}	
			
		if (document.legalHelp.income.options[document.legalHelp.income.selectedIndex].value == "")
			{
				alert("Desired Additional Income?");
				document.legalHelp.income.focus();
				return false;
			}
if (document.legalHelp.investamount.options[document.legalHelp.investamount.selectedIndex].value == "")
			{
				alert("Invest Amount?");
				document.legalHelp.investamount.focus();
				return false;
			}
if (document.legalHelp.creditrate.options[document.legalHelp.creditrate.selectedIndex].value == "")
			{
				alert("Please select your credit rate");
				document.legalHelp.creditrate.focus();
				return false;
			}
		if (document.legalHelp.reason.options[document.legalHelp.reason.selectedIndex].value == "")
			{
				alert("Please select your Reason for Start");
				document.legalHelp.reason.focus();
				return false;
			}	
if (document.legalHelp.interestlevel.options[document.legalHelp.interestlevel.selectedIndex].value == "")
			{
				alert("Please select your interest level");
				document.legalHelp.interestlevel.focus();
				return false;
			}	
if (document.legalHelp.age.options[document.legalHelp.age.selectedIndex].value == "")
			{
				alert("Please select your age");
				document.legalHelp.age.focus();
				return false;
			}			
				
	}	

/**************** Radio Button Check ***********/

function CheckCredit() 
{ 
   if (document.legalHelp.weightlossquestion3[0].checked == false) 
      {alert ("You must have a credit card or checking account.") 
      return false;
   }else{
	    return true;
	 }
} 

/**************** End Radio Button Check ***********/
				 
	function CheckNull(boxName, Readable)	{
	  if (boxName.value == "")
	{  alert("You must enter something in the " + Readable + " box.")
		boxName.focus()
	    return false  }
	  else 	{
	    return true			}	}
	    


			 
	function CheckEmail(email)  {
		 if (email.value.indexOf("@") == -1)  
		 { alert("Your e-mail address needs to have an AT sign in it. Please enter a correct e-mail address so that we can get your information to you.")
		   email.focus()
		   return false   }
		 else	
/**************** stop if AT is the first character ***********/
		 if (email.value.indexOf("@") == 0)  
		 { alert("Your e-mail address can not start with an AT sign. Please enter a correct e-mail address so that we can get your information to you.")
		   email.focus()
		   return false   }
		 else	
/* ************* look for the dot *************************** */
		 if (email.value.indexOf(".") == -1)  
		 { alert("Your e-mail address needs to have a DOT in it. Please enter a correct e-mail address so that we can get your information to you.")
		   email.focus()
		   return false   } 
		 else	
/****************************************************************/
/************** FORBIDDEN CHARACTERS ****************************/
/****************************************************************/
/************* stop if it has a comma ***************************/
		if  (email.value.indexOf(",") != -1)  
		 { alert("Your e-mail address can not contain a comma. Please enter a correct e-mail address so that we can get your information to you.")
		   email.focus()
		   return false   } 
		 else	
/************* stop if it has a semi colon **********************/
		if  (email.value.indexOf(";") != -1)  
		 { alert("Your e-mail address can not contain a semi colon. Please enter a correct e-mail address so that we can get your information to you.")
		   email.focus()
		   return false   } 
		 else	
/************* we are allowing tildes *****************************/
/************* stop if it has a space ***************************/
		if  (email.value.indexOf(" ") != -1)  
		 { alert("Your e-mail address can not contain a space and there can be no spaces at the beginning or the end of the email address. Please enter a correct e-mail address so that we can get your information to you.")
		   email.focus()
		   return false   } 
		 else	
/***************** stop if it has  a ] *****************************/		 
		 if (email.value.indexOf("]") != - 1)  
		 { alert("Your e-mail address can not contain a SQUARE BRACKET.  Please enter a correct e-mail address so that we can get your information to you.")
		   email.focus()
		   return false   }
		 else	
/***************** stop if it has  a [ *****************************/		 
		 if (email.value.indexOf("[") != - 1)  
		 { alert("Your e-mail address can not contain a SQUARE BRACKET.  Please enter a correct e-mail address so that we can get your information to you.")
		   email.focus()
		   return false   }
		 else	
/*****************************************************************/
/****************** special AT and DOT stuff *********************/
/*****************************************************************/
/* *************** look for @ before the LAST dot *************** */
		var AtSpot = email.value.indexOf("@")
		var lastDotSpot = email.value.lastIndexOf(".")
		 if (lastDotSpot < AtSpot)  
		 { alert("Your e-mail address must have a DOT somewhere after the AT sign .  Please enter a correct e-mail address so that we can get your information to you.")
		   email.focus()
		   return false   }
		 else	
/***************** if it starts w a dot stop *************************/		 
		 var firstDotSpot = email.value.indexOf(".")
		 if (firstDotSpot == 0)  
		 { alert("Your e-mail address can not start with a DOT.  Please enter a correct e-mail address so that we can get your information to you.")
		   email.focus()
		   return false   }
		 else	
/***************** if it ends w a dot stop ***************************/		 
		 var theLength = email.value.length
		 if (lastDotSpot == theLength - 1)  
		 { alert("Your e-mail address can not end with a DOT.  Please enter a correct e-mail address so that we can get your information to you.")
		   email.focus()
		   return false   }
		 else	
/**************** look for 2 AT signs ********************************/		 
		 var lastAtSpot = email.value.lastIndexOf("@")
		 if (AtSpot != lastAtSpot)  
		 { alert("Your e-mail address can not contain 2 AT stgns. You may enter only one email name.")
		   email.focus()
		   return false   }
		 else	
/*********************************************************************/
/**************** characters it cant have after the AT ***************/
/*********************************************************************/
/***************** stop if it has a + after the AT *******************/		 
		 if (email.value.lastIndexOf("+") > AtSpot)  
		 { alert("Your e-mail address can not have a PLUS SIGN there.  Please enter a correct e-mail address so that we can get your information to you.")
		   email.focus()
		   return false   }
		 else	
/***************** stop if it has a = after the AT *******************/		 
		 if (email.value.lastIndexOf("=") > AtSpot)  
		 { alert("Your e-mail address can not have an EQUALS SIGN there.  Please enter a correct e-mail address so that we can get your information to you.")
		   email.focus()
		   return false   }
		 else	
/************* stop if it has an ampersand after the AT ************/
		 if (email.value.lastIndexOf("&") > AtSpot)  
		 { alert("Your e-mail address can not contain an AND sign there. Please enter a correct e-mail address so that we can get your information to you.")
		   email.focus()
		   return false   } 
		 else   
/************* stop if it has a slash after the AT *****************/
		 if (email.value.lastIndexOf("/") > AtSpot)  
		 { alert("Your e-mail address can not contain a SLASH there. Please enter a correct e-mail address so that we can get your information to you.")
		   email.focus()
		   return false   } 
		 else   
/************* stop if it has a pound sign after the AT *************/
		 if (email.value.lastIndexOf("#") > AtSpot)  
		 { alert("Your e-mail address can not contain a POUND SIGN there. Please enter a correct e-mail address so that we can get your information to you.")
		   email.focus()
		   return false   } 
		 else   
/************* stop if it has a ? after the AT **********************/
		 if (email.value.lastIndexOf("?") > AtSpot)  
		 { alert("Your e-mail address can not contain a QUESTION MARK there. Please enter a correct e-mail address so that we can get your information to you.")
		   email.focus()
		   return false   } 
		 else   
/************* stop if it has a ) after the AT *******************************/
		 if (email.value.lastIndexOf(")") > AtSpot)  
		 { alert("Your e-mail address can not contain a RIGHT PARENS there. Please enter a correct e-mail address so that we can get your information to you.")
		   email.focus()
		   return false   } 
		 else   
/************* stop if it has a ( after the AT *******************************/
		 if (email.value.lastIndexOf("(") > AtSpot)  
		 { alert("Your e-mail address can not contain a LEFT PARENS there. Please enter a correct e-mail address so that we can get your information to you.")
		   email.focus()
		   return false   } 
		 else   
/**************** guess it looks OK **********************************/
		 {
		   return true
		 			 }
		 			 }
