function runScripts() {
	return  ( 
			CheckNull(document.Form1.firstName, "First Name") &&
			CheckNull(document.Form1.lastName, "Last Name") &&
			CheckNull(document.Form1.address1, "Address") && 
			CheckNull(document.Form1.city, "City") && 
			CheckNull(document.Form1.zipCode, "Zip") && 
			CheckValidDayPhoneNumber() &&
			CheckValidEveningPhoneNumber() &&
			CheckEmail(document.Form1.emailAddress) &&
			CheckQuestions()
		)
	}
	
/********************** START CHECK PHONE NUMBER ******************************/
function CheckValidDayPhoneNumber() {
	var theErrorMessage = "Please enter a valid phone number.\r\n\r\n";
	var theErrorIndex = 0;
	var theAreaCode = document.Form1.phoneAreaDay.value;
	var theExchange = document.Form1.phonePrefixDay.value;
	var thePhoneNumber = theAreaCode + theExchange + document.Form1.phoneStationDay.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.Form1.phoneStationDay.value == null) || (document.Form1.phoneStationDay.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.Form1.phoneAreaDay.value = "";
		document.Form1.phonePrefixDay.value = "";
		document.Form1.phoneStationDay.value = "";
		document.Form1.phoneAreaDay.focus();
		return false;
		}
	else {
		return true;
		}
	}
/********************** END CHECK PHONE NUMBER ******************************/

function CheckValidEveningPhoneNumber() {
	var theErrorMessage = "Please enter a valid evening phone number.\r\n\r\n";
	var theErrorIndex = 0;
	var theAreaCode = document.Form1.phoneAreaEvening.value;
	var theExchange = document.Form1.phonePrefixEvening.value;
	var thePhoneNumber = theAreaCode + theExchange + document.Form1.phoneStationEvening.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.Form1.phoneStationEvening.value == null) || (document.Form1.phoneStationEvening.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 evening phone number.\r\n\r\n") {
		alert(theErrorMessage);
		document.Form1.phoneAreaEvening.value = "";
		document.Form1.phonePrefixEvening.value = "";
		document.Form1.phoneStationEvening.value = "";
		document.Form1.phoneAreaEvening.focus();
		return false;
		}
	else {
		return true;
		}
	}
/********************** END CHECK PHONE NUMBER ******************************/

function CheckQuestions() 
	{
		if (document.Form1.titleParam.options[document.Form1.titleParam.selectedIndex].value == "")
			{
				alert("Please select a title");
				document.Form1.titleParam.focus();
				return false;
			}
		if (document.Form1.stateParam.options[document.Form1.stateParam.selectedIndex].value == "")
			{
				alert("Please select a state");
				document.Form1.stateParam.focus();
				return false;
			}	
		if (document.Form1.educationLevel.options[document.Form1.educationLevel.selectedIndex].value == "")
			{
				alert("Please select Highest Level of Education");
				document.Form1.educationLevel.focus();
				return false;
			}	

if (document.Form1.yearOfBirth.options[document.Form1.yearOfBirth.selectedIndex].value == "")
			{
				alert("Please select Year of birth");
				document.Form1.yearOfBirth.focus();
				return false;
			}				
	}	

/**************** 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
		 			 }
		 			 }
