function validateForm_apply1(form1) { //This is the name of the function
if (form1.contactFirst.value == "") { //This checks to make sure the field is not empty
   alert("First Name is required to process this form."); //Informs user of empty field
   form1.contactFirst.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
if (form1.contactLast.value == "") { //This checks to make sure the field is not empty
   alert("Last Name is required to process this form."); //Informs user of empty field
   form1.contactLast.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
      
if (form1.email.value == "") { //This checks to make sure the field is not empty
   alert("Email is required to process this form."); //Informs user of empty field
   form1.email.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
}
function validateForm_apply2(form1) { //This is the name of the function
   
if (form1.email.value == "") { //This checks to make sure the field is not empty
   alert("Email is required to process this form."); //Informs user of empty field
   form1.email.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
}


function validateForm_apply() { //This is the name of the function
if (document.form1.contactFirst.value == "") { //This checks to make sure the field is not empty
   alert("First Name is required to process this form."); //Informs user of empty field
   document.form1.contactFirst.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
if (document.form1.contactLast.value == "") { //This checks to make sure the field is not empty
   alert("Last Name is required to process this form."); //Informs user of empty field
   document.form1.contactLast.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
      
if (document.form1.email.value == "") { //This checks to make sure the field is not empty
   alert("Email is required to process this form."); //Informs user of empty field
   document.form1.email.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
 if (document.form1.captcha.value == "") { //This checks to make sure the field is not empty
   alert("captcha is required to process this form."); //Informs user of empty field
   document.form1.captcha.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   document.form1.action="apply.cfm?p=2";
}

function validateForm_applyNew(form1) { //This is the name of the function
if (form1.ChurchName.value == "") { //This checks to make sure the field is not empty
   alert("Church Name is required to process this form."); //Informs user of empty field
   form1.ChurchName.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
if (form1.ContactPerson.value == "") { //This checks to make sure the field is not empty
   alert("Name of person to Contact is required to process this form."); //Informs user of empty field
   form1.ContactPerson.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
if (form1.ChurchFounded.value == "") { //This checks to make sure the field is not empty
   alert("Year of church founded is required to process this form."); //Informs user of empty field
   form1.ChurchFounded.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
if (form1.LastYear.value == "") { //This checks to make sure the field is not empty
   alert("Gross Income of last year is required to process this form."); //Informs user of empty field
   form1.LastYear.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
if (form1.Last2Years.value == "") { //This checks to make sure the field is not empty
   alert("Gross Income of last 2 years is required to process this form."); //Informs user of empty field
   form1.Last2Years.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
if (form1.Last3Years.value == "") { //This checks to make sure the field is not empty
   alert("Gross Income of last 3 years is required to process this form."); //Informs user of empty field
   form1.Last3Years.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
if (form1.LoanAmount.value == "") { //This checks to make sure the field is not empty
   alert("Loan Amount is required to process this form."); //Informs user of empty field
   form1.LoanAmount.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
if (form1.email.value == "") { //This checks to make sure the field is not empty
   alert("Email is required to process this form."); //Informs user of empty field
   form1.email.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
}   

function validateForm_brokers() { //This is the name of the function
		form = document.form1;
	if (form.companyname.value == "") { //This checks to make sure the field is not empty
	   alert("Company is required to process this form."); //Informs user of empty field
	   form.companyname.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }
	   
	if (form.firstname.value == "") { //This checks to make sure the field is not empty
	   alert("First Name is required to process this form."); //Informs user of empty field
	   form.firstname.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }
	
	if (form.lastname.value == "") { //This checks to make sure the field is not empty
	   alert("A Last Name is required to process this form."); //Informs user of empty field
	   form.lastname.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }
	   
	if (form.address1.value == "") { //This checks to make sure the field is not empty
	   alert("An address is required to process this form."); //Informs user of empty field
	   form.address1.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }
	   
	if (form.areacode.value == "") { //This checks to make sure the field is not empty
	   alert("A Phone Number (Area Code) is required to process this form."); //Informs user of empty field
	   form.areacode.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }else{
		   if (isNaN(form.areacode.value)){
			alert("A Phone Number (Area Code) is should be a number."); //Informs user of empty field
			form.areacode.value = "";
			form.areacode.focus( ); //This focuses the cursor on the empty field
			return false; 
		   }
	   }
	
	if (form.prefix.value == "") { //This checks to make sure the field is not empty
	   alert("A Phone Number (Prefix) is required to process this form."); //Informs user of empty field
	   form.prefix.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }else{
		   if (isNaN(form.prefix.value)){
			alert("A Phone Number (Prefix) is should be a number."); //Informs user of empty field
			form.prefix.value = "";
			form.prefix.focus( ); //This focuses the cursor on the empty field
			return false; 
		   }
	   }
	   
	if (form.suffix.value == "") { //This checks to make sure the field is not empty
	   alert("A Phone Number (Suffix) is required to process this form."); //Informs user of empty field
	   form.suffix.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }else{
		   if (isNaN(form.suffix.value)){
			alert("A Phone Number (Suffix) is should be a number."); //Informs user of empty field
			form.suffix.value = "";
			form.suffix.focus( ); //This focuses the cursor on the empty field
			return false; 
		   }
	   }
	   
	if (form.faxareacode.value == "") { //This checks to make sure the field is not empty
	   alert("A Fax number (Area Code) is required to process this form"); //Informs user of empty field
	   form.faxareacode.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }else{
		   if (isNaN(form.faxareacode.value)){
			alert("A Fax number (Area Code) is should be a number."); //Informs user of empty field
			form.faxareacode.value = "";
			form.faxareacode.focus( ); //This focuses the cursor on the empty field
			return false; 
		   }
	   }
	
	if (form.faxprefix.value == "") { //This checks to make sure the field is not empty
	   alert("A Fax Number (Prefix) is required to process this form."); //Informs user of empty field
	   form.faxprefix.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }else{
		   if (isNaN(form.faxprefix.value)){
			alert("A Fax Number (Prefix) is should be a number."); //Informs user of empty field
			form.faxprefix.value = "";
			form.faxprefix.focus( ); //This focuses the cursor on the empty field
			return false; 
		   }
	   }
	   
	if (form.faxsuffix.value == "") { //This checks to make sure the field is not empty
	   alert("A Fax Number (Suffix) is required to process this form."); //Informs user of empty field
	   form.faxsuffix.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }else{
		   if (isNaN(form.faxsuffix.value)){
			alert("A Fax Number (Suffix) is should be a number."); //Informs user of empty field
			form.faxsuffix.value = "";
			form.faxsuffix.focus( ); //This focuses the cursor on the empty field
			return false; 
		   }
	   }
	
	
	if (form.email.value == "") { //This checks to make sure the field is not empty
	   alert("An email address is required to process this form."); //Informs user of empty field
	   form.email.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }
	   
	if (echeck(form.email.value)==false){
		form.email.value=""
		form.email.focus()
		return false;
		}
	
	if (fcheck('form1', 'email')==false){
		form.email.value=""
		form.email.focus()
		return false;
		}
	
	   if (form.username.value == "") { //This checks to make sure the field is not empty
	   alert("A username is required to process this form."); //Informs user of empty field
	   form.username.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }
	   
	   if (form.password.value == "") { //This checks to make sure the field is not empty
	   alert("A password is required to process this form."); //Informs user of empty field
	   form.password.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }
		if (form.captcha.value == "") { //This checks to make sure the field is not empty
	   alert("captcha is required to process this form."); //Informs user of empty field
	   form.captcha.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }
	// you may copy the above 5 lines for each form field you wish to validate
	// Replace the text "FIELD1" with the name you wish to call the field
	 form.action="brokers-registration.cfm?p=2"
}

function validateForm_members(form) { //This is the name of the function
	if (form.companyname.value == "") { //This checks to make sure the field is not empty
	   alert("Company is required to process this form."); //Informs user of empty field
	   form.companyname.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }
	   
	if (form.firstname.value == "") { //This checks to make sure the field is not empty
	   alert("First Name is required to process this form."); //Informs user of empty field
	   form.firstname.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }
	
	if (form.lastname.value == "") { //This checks to make sure the field is not empty
	   alert("Last Name is required to process this form."); //Informs user of empty field
	   form.lastname.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }
	   
	if (form.address1.value == "") { //This checks to make sure the field is not empty
	   alert("An Address is required to process this form."); //Informs user of empty field
	   form.address1.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }
	   
	if (form.areacode.value == "") { //This checks to make sure the field is not empty
	   alert("A Phone Number (Area Code) is required to process this form."); //Informs user of empty field
	   form.areacode.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }
	
	if (form.prefix.value == "") { //This checks to make sure the field is not empty
	   alert("A Phone Number (Prefix) is required to process this form."); //Informs user of empty field
	   form.prefix.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }
	   
	if (form.suffix.value == "") { //This checks to make sure the field is not empty
	   alert("A Phone Number (Suffix) is required to process this form."); //Informs user of empty field
	   form.suffix.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }
	   
	if (form.faxareacode.value == "") { //This checks to make sure the field is not empty
	   alert("A Fax number (Area Code) is required to process this form"); //Informs user of empty field
	   form.faxareacode.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }
	
	if (form.faxprefix.value == "") { //This checks to make sure the field is not empty
	   alert("A Fax number (Prefix) is required to process this form"); //Informs user of empty field
	   form.faxprefix.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }
	
	if (form.faxsuffix.value == "") { //This checks to make sure the field is not empty
	   alert("A Fax number (Suffix) is required to process this form"); //Informs user of empty field
	   form.faxsuffix.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }
	
	if (form.email.value == "") { //This checks to make sure the field is not empty
	   alert("An Email is required to process this form."); //Informs user of empty field
	   form.email.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }
	   
	   if (form.username.value == "") { //This checks to make sure the field is not empty
	   alert("A Username is required to process this form."); //Informs user of empty field
	   form.username.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }
	   
	   if (form.password.value == "") { //This checks to make sure the field is not empty
	   alert("A Password is required to process this form."); //Informs user of empty field
	   form.password.focus( ); //This focuses the cursor on the empty field
	   return false; //This prevents the form from being submitted
	   }
	// you may copy the above 5 lines for each form field you wish to validate
	// Replace the text "FIELD1" with the name you wish to call the field
}
