/*
    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
!myRE.test
*/
//Launch Calculators
function launchCalc(calc_name) 
{
  popupObj = window.open (calc_name,'Form','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=0,width=625,height=375');
  popupObj.focus();
}

//Validate Annuity Forms
function Check_Annuity(theForm)
{
    var errorFree = true;
    var theError = "You have entered in the following information improperly:\n";

    if(theForm.first_name.value.length == 0)
	{
	    theError += "\n\t-First Name";
	    errorFree = false;
	}
    
    if(theForm.last_name.value.length == 0)
	{
	    theError += "\n\t-Last Name";
	    errorFree = false;
	}
    
    if(theForm.real_addr.value.length == 0)
	{
	    theError += "\n\t-Street Address";
	    errorFree = false;
	}
    
    if(theForm.city.value.length == 0)
	{
	    theError += "\n\t-City";
	    errorFree = false;
	}
    
    if(theForm.zip_code.value.length !=5 || isNaN(theForm.zip_code.value))
	{
	    theError += "\n\t-Zip Code";
	    errorFree = false;
	}
    
    if(theForm.day_phone_ac.value.length == 0 || theForm.day_phone_pre.value.length == 0 || theForm.day_phone_num.value.length == 0 || isNaN(theForm.day_phone_ac.value) || isNaN(theForm.day_phone_pre.value) || isNaN(theForm.day_phone_num.value))
	{
	    theError += "\n\t-Day Phone";
	    errorFree = false;
	}
    
    if(theForm.eve_phone_ac.value.length == 0 || theForm.eve_phone_pre.value.length == 0 || theForm.eve_phone_num.value.length == 0 || isNaN(theForm.eve_phone_ac.value) || isNaN(theForm.eve_phone_pre.value) || isNaN(theForm.eve_phone_num.value))
	{
	    theError += "\n\t-Evening Phone";
	    errorFree = false;
	}
    
    myRE = new RegExp(".+@.+\..+");
    if(!myRE.test(theForm.email_addr.value))
	{
	    theError += "\n\t-Email Address";
	    errorFree = false;
	}
    
    //Check Year Field
    myRE = /\d\d/;;
    
    if(!myRE.test(theForm.year.value))
	{
	    theError += "\n\t-Birth Year";
	    errorFree = false;
	}
    
    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.amt_to_invest.value))
    //if(theForm.amt_to_invest.value.length == 0 || isNaN(theForm.amt_to_invest.value))
	{
	    theError += "\n\t-Amount to Invest";
	    errorFree = false;
	}
    
    myRE = /^\d*(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.plan_to_add.value))
	{
	    theError += "\n\t-Lump Sum Payment";
	    errorFree = false;
	}

    if(!errorFree)
	{
	    alert(theError);
	}
    else
	{
	    theForm.submit()
	}

}// End Annuity Validator



//Validate Auto Forms
function Check_Auto(theForm)
{

    var errorFree = true;
    var theError = "You have entered in the following information improperly:";

    if(theForm.first_name.value.length == 0)
	{
	    theError += "\n\t-First Name";
	    errorFree = false;
	}

    if(theForm.last_name.value.length == 0)
	{
	    theError += "\n\t-Last Name";
	    errorFree = false;
	}

    if(theForm.real_addr.value.length == 0)
	{
	    theError += "\n\t-Street Address";
	    errorFree = false;
	}

    if(theForm.city.value.length == 0)
	{
	    theError += "\n\t-City";
	    errorFree = false;
	}

    if(theForm.zip_code.value.length !=5 || isNaN(theForm.zip_code.value))
	{
	    theError += "\n\t-Zip Code";
	    errorFree = false;
	}

    if(theForm.day_phone_ac.value.length == 0 || theForm.day_phone_pre.value.length == 0 || theForm.day_phone_num.value.length == 0 || isNaN(theForm.day_phone_ac.value) || isNaN(theForm.day_phone_pre.value) || isNaN(theForm.day_phone_num.value))
	{
	    theError += "\n\t-Day Phone";
	    errorFree = false;
	}

    if(theForm.eve_phone_ac.value.length == 0 || theForm.eve_phone_pre.value.length == 0 || theForm.eve_phone_num.value.length == 0 || isNaN(theForm.eve_phone_ac.value) || isNaN(theForm.eve_phone_pre.value) || isNaN(theForm.eve_phone_num.value))
	{
	    theError += "\n\t-Evening Phone";
	    errorFree = false;
	}

    myRE = new RegExp(".+@.+\..+");
    if(!myRE.test(theForm.email_addr.value))
	{
	    theError += "\n\t-Email Address";
	    errorFree = false;
	}

    myRE = /\d\d/;
    if(!myRE.test(theForm.year.value))
	{
	    theError += "\n\t-Birth Year";
	    errorFree = false;
	}

    if(theForm.drivers.value.length == 0)
	{
	    theError += "\n\t-Drivers License ";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.paying_now.value))
	{
	    theError += "\n\t-How much are you paying now?";
	    errorFree = false;
	}

    if(theForm.number_drivers.value.length == 0 || isNaN(theForm.number_drivers.value))
	{
	    theError += "\n\t-Number of Drivers in Your Household?";
	    errorFree = false;
	}

    if(theForm.number_vehicles.value.length == 0 || isNaN(theForm.number_vehicles.value))
	{
	    theError += "\n\t-Number of Vehicles in Your Household?";
	    errorFree = false;
	}

    if(theForm.years_had.value.length == 0 || isNaN(theForm.years_had.value))
	{
	    theError += "\n\t-How Many Years Have You Had Your Driver's License?";
	    errorFree = false;
	}

    myRE = /^\d\d\d\d$/;
    if(!myRE.test(theForm.year_made.value))
	{
	    theError += "\n\t-What Year Was Your Car Manufactured? (YYYY)";
	    errorFree = false;
	}

    if(theForm.car_make.value.length == 0)
	{
	    theError += "\n\t-What Is The Make Of Your Car?";
	    errorFree = false;
	}

    if(theForm.car_model.value.length == 0)
	{
	    theError += "\n\t-What Is The Model Of Your Car?";
	    errorFree = false;
	}

   if(!errorFree)
	{
	    alert(theError);
	}
    else
	{
	    theForm.submit()
	}

}//End Auto Validator



//Validate DebtConsolidation Form
function Check_DebtConsolidation(theForm)
{
    var errorFree = true;
    var theError = "You have entered in the following information improperly:";

    if(theForm.fname.value.length == 0)
	{
	    theError += "\n\t-First Name";
	    errorFree = false;
	}

    if(theForm.lname.value.length == 0)
	{
	    theError += "\n\t-Last Name";
	    errorFree = false;
	}

    if(theForm.address1.value.length == 0)
	{
	    theError += "\n\t-Street Address";
	    errorFree = false;
	}

    if(theForm.city.value.length == 0)
	{
	    theError += "\n\t-City";
	    errorFree = false;
	}

    if(theForm.zip_code.value.length !=5 || isNaN(theForm.zip_code.value))
	{
	    theError += "\n\t-Zip Code";
	    errorFree = false;
	}

    if(theForm.day_phone_ac.value.length == 0 || theForm.day_phone_pre.value.length == 0 || theForm.day_phone_num.value.length == 0 || isNaN(theForm.day_phone_ac.value) || isNaN(theForm.day_phone_pre.value) || isNaN(theForm.day_phone_num.value))
	{
	    theError += "\n\t-Day Phone";
	    errorFree = false;
	}

    if(theForm.eve_phone_ac.value.length == 0 || theForm.eve_phone_pre.value.length == 0 || theForm.eve_phone_num.value.length == 0 || isNaN(theForm.eve_phone_ac.value) || isNaN(theForm.eve_phone_pre.value) || isNaN(theForm.eve_phone_num.value))
	{
	    theError += "\n\t-Evening Phone";
	    errorFree = false;
	}

    myRE = new RegExp(".+@.+\..+");
    if(!myRE.test(theForm.email_addr.value))
	{
	    theError += "\n\t-Email Address";
	    errorFree = false;
	}

//      if(theForm.self_employed.options[0].selected && (theForm.years_employed.value.length == 0 || isNaN(theForm.years_employed.value)))
//  	{
//  	    theError += "\n\t-How long have you been with your employer?";
//  	    errorFree = false;
//  	}

//      myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
//      if(!myRE.test(theForm.monthly_gross.value))
//  	{
//  	    theError += "\n\t-How much do you gross each month?";
//  	    errorFree = false;
//  	}

//      myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
//      if(!myRE.test(theForm.monthly_debt.value))
//  	{
//  	    theError += "\n\t-How much do you owe each month?";
//  	    errorFree = false;
//  	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.cash_needed.value))
	{
	    theError += "\n\t-How much cash do you need?";
	    errorFree = false;
	}

    if(theForm.how_long_owned.value.length == 0 || isNaN(theForm.how_long_owned.value))
	{
	    theError += "\n\t-How long have you owned your home?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.home_sale_price.value))
	{
	    theError += "\n\t-Your home's original sale price?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.mortgage_balance.value))
	{
	    theError += "\n\t-Your current mortgage balance?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.monthly_payment.value))
	{
	    theError += "\n\t-Your current mortgage monthly payment?";
	    errorFree = false;
	}

    myRE = /^\d+(\.\d{2})?$/;
    if(!myRE.test(theForm.current_rate.value))
	{
	    theError += "\n\t-Current mortgage interest rate";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.current_worth.value))
	{
	    theError += "\n\t-How much is your home currently worth?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(theForm.second_mortgage.options[1].selected && !myRE.test(theForm.second_balance.value))
	{
	    theError += "\n\t-2nd mortgage balance?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(theForm.second_mortgage.options[1].selected && !myRE.test(theForm.second_payment.value))
	{
	    theError += "\n\t-2nd mortgage monthly payment?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(theForm.second_mortgage.options[1].selected && !myRE.test(theForm.second_rate.value))
	{
	    theError += "\n\t-2nd mortgage interest rate?";
	    errorFree = false;
	}

    myRE = /^\d+(\.\d{2})?$/;
    if(theForm.second_mortgage.options[1].selected && !myRE.test(theForm.second_rate.value))
	{
	    theError += "\n\t-2nd mortgage interest rate?";
	    errorFree = false;
	}

   if(!errorFree)
	{
	    alert(theError);
	}
    else
	{
	    theForm.submit()
	}

} //End DebtConsolidation Validator



//Validate Disability Form
function Check_Disability(theForm)
{
    var errorFree = true;
    var theError = "You have entered in the following information improperly:";

    if(theForm.first_name.value.length == 0)
	{
	    theError += "\n\t-First Name";
	    errorFree = false;
	}

    if(theForm.last_name.value.length == 0)
	{
	    theError += "\n\t-Last Name";
	    errorFree = false;
	}

    if(theForm.real_addr.value.length == 0)
	{
	    theError += "\n\t-Street Address";
	    errorFree = false;
	}

    if(theForm.city.value.length == 0)
	{
	    theError += "\n\t-City";
	    errorFree = false;
	}

    if(theForm.zip_code.value.length !=5 || isNaN(theForm.zip_code.value))
	{
	    theError += "\n\t-Zip Code";
	    errorFree = false;
	}

    if(theForm.day_phone_ac.value.length == 0 || theForm.day_phone_pre.value.length == 0 || theForm.day_phone_num.value.length == 0 || isNaN(theForm.day_phone_ac.value) || isNaN(theForm.day_phone_pre.value) || isNaN(theForm.day_phone_num.value))
	{
	    theError += "\n\t-Day Phone";
	    errorFree = false;
	}

    if(theForm.eve_phone_ac.value.length == 0 || theForm.eve_phone_pre.value.length == 0 || theForm.eve_phone_num.value.length == 0 || isNaN(theForm.eve_phone_ac.value) || isNaN(theForm.eve_phone_pre.value) || isNaN(theForm.eve_phone_num.value))
	{
	    theError += "\n\t-Evening Phone";
	    errorFree = false;
	}

    myRE = new RegExp(".+@.+\..+");
    if(!myRE.test(theForm.email_addr.value))
	{
	    theError += "\n\t-Email Address";
	    errorFree = false;
	}

    myRE = /\d\d/;
    if(!myRE.test(theForm.year.value))
	{
	    theError += "\n\t-Birth Year";
	    errorFree = false;
	}

    if(theForm.weight.value.length == 0 || isNaN(theForm.weight.value))
	{
	    theError += "\n\t-Weight";
	    errorFree = false;
	}

    if(theForm.self.options[0].selected && theForm.employer.value.length == 0)
	{
	    theError += "\n\t-If 'No', who is your employer?";
	    errorFree = false;
	}

    if(theForm.business_type.value.length == 0)
	{
	    theError += "\n\t-What type of business are you employed with?";
	    errorFree = false;
	}

    if(theForm.position.value.length == 0)
	{
	    theError += "\n\t-What is your position?";
	    errorFree = false;
	}

    if(theForm.occupation.value.length == 0)
	{
	    theError += "\n\t-Occupation";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.gross.value))
	{
	    theError += "\n\t-Present Monthly Gross Income";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.benefit.value))
	{
	    theError += "\n\t-Monthly Benefit Requested";
	    errorFree = false;
	}

   if(!errorFree)
	{
	    alert(theError);
	}
    else
	{
	    theForm.submit()
	}

} //End Disability Validator



//Validate GroupHealth Form
function Check_GroupHealth(theForm)
{
    var errorFree = true;
    var theError = "You have entered in the following information improperly:";

    if(theForm.first_name.value.length == 0)
	{
	    theError += "\n\t-First Name";
	    errorFree = false;
	}

    if(theForm.last_name.value.length == 0)
	{
	    theError += "\n\t-Last Name";
	    errorFree = false;
	}

    if(theForm.real_addr.value.length == 0)
	{
	    theError += "\n\t-Street Address";
	    errorFree = false;
	}

    if(theForm.city.value.length == 0)
	{
	    theError += "\n\t-City";
	    errorFree = false;
	}

    if(theForm.zip_code.value.length !=5 || isNaN(theForm.zip_code.value))
	{
	    theError += "\n\t-Zip Code";
	    errorFree = false;
	}

    if(theForm.day_phone_ac.value.length == 0 || theForm.day_phone_pre.value.length == 0 || theForm.day_phone_num.value.length == 0 || isNaN(theForm.day_phone_ac.value) || isNaN(theForm.day_phone_pre.value) || isNaN(theForm.day_phone_num.value))
	{
	    theError += "\n\t-Day Phone";
	    errorFree = false;
	}

    if(theForm.eve_phone_ac.value.length == 0 || theForm.eve_phone_pre.value.length == 0 || theForm.eve_phone_num.value.length == 0 || isNaN(theForm.eve_phone_ac.value) || isNaN(theForm.eve_phone_pre.value) || isNaN(theForm.eve_phone_num.value))
	{
	    theError += "\n\t-Evening Phone";
	    errorFree = false;
	}

    myRE = new RegExp(".+@.+\..+");
    if(!myRE.test(theForm.email_addr.value))
	{
	    theError += "\n\t-Email Address";
	    errorFree = false;
	}

    if(theForm.ename1.value.length == 0)
	{
	    theError += "\n\t-Employee 1's Name";
	    errorFree = false;
	}

    if(theForm.occu1.value.length == 0)
	{
	    theError += "\n\t-Employee 1's Occupation";
	    errorFree = false;
	}

    if(theForm.age1.value.length == 0 || isNaN(theForm.age1.value))
	{
	    theError += "\n\t-Employee 1's Age";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.salary1.value))
	{
	    theError += "\n\t-Employee 1's Salary";
	    errorFree = false;
	}
    /*
    //Employee 2
    if((theForm.ename2.value.length != 0 || theForm.age2.value.length !=0 || theForm.occu2.value.length !=0 || theForm.salary2.value.length !=0) && (theForm.ename2.value.length == 0 || theForm.age2.value.length == 0 || theForm.occu2.value.length == 0 || theForm.salary2.value.length == 0))
	{
	    if(theForm.ename2.value.length == 0)
		{
		    theError += "\n\t-Employee 2's Name";
		    errorFree = false;
		}
	    
	    if(theForm.occu2.value.length == 0)
		{
		    theError += "\n\t-Employee 2's Occupation";
		    errorFree = false;
		}
	    
	    if(theForm.age2.value.length == 0 || isNaN(theForm.age2.value))
		{
		    theError += "\n\t-Employee 2's Age";
		    errorFree = false;
		}
	    
	    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
	    if(!myRE.test(theForm.salary2.value))
		{
		    theError += "\n\t-Employee 2's Salary";
		    errorFree = false;
		}
	}
    else
	{
	    if(theForm.age2.value.length != 0 && isNaN(theForm.age2.value))
		{
		    theError += "\n\t-Employee 2's Age";
		    errorFree = false;
		}
	    
	    myRE = /^\d*(,\d{3})*(\.\d{2})?$/;
	    if(!myRE.test(theForm.salary2.value))
		{
		    theError += "\n\t-Employee 2's Salary";
		    errorFree = false;
		}
	}
    */


    //Employee 3
    if((theForm.ename3.value.length != 0 || theForm.age3.value.length !=0 || theForm.occu3.value.length !=0 || theForm.salary3.value.length !=0) && (theForm.ename3.value.length == 0 || theForm.age3.value.length == 0 || theForm.occu3.value.length == 0 || theForm.salary3.value.length == 0))
	{
	    if(theForm.ename3.value.length == 0)
		{
		    theError += "\n\t-Employee 3's Name";
		    errorFree = false;
		}

	    if(theForm.occu3.value.length == 0)
		{
		    theError += "\n\t-Employee 3's Occupation";
		    errorFree = false;
		}

	    if(theForm.age3.value.length ==0 || isNaN(theForm.age3.value))
		{
		    theError += "\n\t-Employee 3's Age";
		    errorFree = false;
		}

	    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
	    if(!myRE.test(theForm.salary3.value))
		{
		    theError += "\n\t-Employee 3's Salary";
		    errorFree = false;
		}
	}
    else
	{
	    if(theForm.age3.value.length != 0 && isNaN(theForm.age3.value))
		{
		    theError += "\n\t-Employee 3's Age";
		    errorFree = false;
		}

	    myRE = /^\d*(,\d{3})*(\.\d{2})?$/;
	    if(!myRE.test(theForm.salary3.value))
		{
		    theError += "\n\t-Employee 3's Salary";
		    errorFree = false;
		}
	}

    //Employee 4
    if((theForm.ename4.value.length != 0 || theForm.age4.value.length !=0 || theForm.occu4.value.length !=0 || theForm.salary4.value.length !=0) && (theForm.ename4.value.length == 0 || theForm.age4.value.length == 0 || theForm.occu4.value.length == 0 || theForm.salary4.value.length == 0))
	{
	    if(theForm.ename4.value.length == 0)
		{
		    theError += "\n\t-Employee 4's Name";
		    errorFree = false;
		}

	    if(theForm.occu4.value.length == 0)
		{
		    theError += "\n\t-Employee 4's Occupation";
		    errorFree = false;
		}

	    if(theForm.age4.value.length ==0 || isNaN(theForm.age4.value))
		{
		    theError += "\n\t-Employee 4's Age";
		    errorFree = false;
		}

	    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
	    if(!myRE.test(theForm.salary4.value))
		{
		    theError += "\n\t-Employee 4's Salary";
		    errorFree = false;
		}
	}
    else
	{
	    if(theForm.age4.value.length != 0 && isNaN(theForm.age4.value))
		{
		    theError += "\n\t-Employee 4's Age";
		    errorFree = false;
		}

	    myRE = /^\d*(,\d{3})*(\.\d{2})?$/;
	    if(!myRE.test(theForm.salary4.value))
		{
		    theError += "\n\t-Employee 4's Salary";
		    errorFree = false;
		}
	}

    //Employee 5
    if((theForm.ename5.value.length != 0 || theForm.age5.value.length !=0 || theForm.occu5.value.length !=0 || theForm.salary5.value.length !=0) && (theForm.ename5.value.length == 0 || theForm.age5.value.length == 0 || theForm.occu5.value.length == 0 || theForm.salary5.value.length == 0))
	{
	    if(theForm.ename5.value.length == 0)
		{
		    theError += "\n\t-Employee 5's Name";
		    errorFree = false;
		}

	    if(theForm.occu5.value.length == 0)
		{
		    theError += "\n\t-Employee 5's Occupation";
		    errorFree = false;
		}

	    if(theForm.age5.value.length ==0 || isNaN(theForm.age5.value))
		{
		    theError += "\n\t-Employee 5's Age";
		    errorFree = false;
		}

	    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
	    if(!myRE.test(theForm.salary5.value))
		{
		    theError += "\n\t-Employee 5's Salary";
		    errorFree = false;
		}
	}
    else
	{
	    if(theForm.age5.value.length != 0 && isNaN(theForm.age5.value))
		{
		    theError += "\n\t-Employee 5's Age";
		    errorFree = false;
		}

	    myRE = /^\d*(,\d{3})*(\.\d{2})?$/;
	    if(!myRE.test(theForm.salary5.value))
		{
		    theError += "\n\t-Employee 5's Salary";
		    errorFree = false;
		}
	}

   if(!errorFree)
	{
	    alert(theError);
	}
    else
	{
	    theForm.submit()
	}

}//End GroupHealth Validator



//Validate Health Form
function Check_Health(theForm)
{
    var errorFree = true;
    var theError = "You have entered in the following information improperly:";

    if(theForm.first_name.value.length == 0)
	{
	    theError += "\n\t-First Name";
	    errorFree = false;
	}

    if(theForm.last_name.value.length == 0)
	{
	    theError += "\n\t-Last Name";
	    errorFree = false;
	}

    if(theForm.real_addr.value.length == 0)
	{
	    theError += "\n\t-Street Address";
	    errorFree = false;
	}

    if(theForm.city.value.length == 0)
	{
	    theError += "\n\t-City";
	    errorFree = false;
	}

    if(theForm.zip_code.value.length !=5 || isNaN(theForm.zip_code.value))
	{
	    theError += "\n\t-Zip Code";
	    errorFree = false;
	}

    if(theForm.day_phone_ac.value.length == 0 || theForm.day_phone_pre.value.length == 0 || theForm.day_phone_num.value.length == 0 || isNaN(theForm.day_phone_ac.value) || isNaN(theForm.day_phone_pre.value) || isNaN(theForm.day_phone_num.value))
	{
	    theError += "\n\t-Day Phone";
	    errorFree = false;
	}

    if(theForm.eve_phone_ac.value.length == 0 || theForm.eve_phone_pre.value.length == 0 || theForm.eve_phone_num.value.length == 0 || isNaN(theForm.eve_phone_ac.value) || isNaN(theForm.eve_phone_pre.value) || isNaN(theForm.eve_phone_num.value))
	{
	    theError += "\n\t-Evening Phone";
	    errorFree = false;
	}

    myRE = new RegExp(".+@.+\..+");
    if(!myRE.test(theForm.email_addr.value))
	{
	    theError += "\n\t-Email Address";
	    errorFree = false;
	}

    myRE = /\d\d/;
    if(!myRE.test(theForm.year.value))
	{
	    theError += "\n\t-Birth Year";
	    errorFree = false;
	}

    if(theForm.weight.value.length == 0 || isNaN(theForm.weight.value))
	{
	    theError += "\n\t-Weight";
	    errorFree = false;
	}

    if(theForm.dependents.value.length == 0 || isNaN(theForm.dependents.value))
	{
	    theError += "\n\t-How many dependents do you have?";
	    errorFree = false;
	}
    else
	{
	    myRE = /^\d+(\s*,\s*\d+)*$/;
	    if(theForm.dependents.value != 0 && !myRE.test(theForm.old_dependents.value))
		{
		    theError += "\n\t-How old are those dependents?";
		    errorFree = false;
		}
	}

    if(theForm.occupation.value.length == 0)
	{
	    theError += "\n\t-Occupation";
	    errorFree = false;
	}

    if(theForm.current_company.value.length == 0)
	{
	    theError += "\n\t-Your current insurance company?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.pay_month.value))
	{
	    theError += "\n\t-How much are you paying per month?";
	    errorFree = false;
	}

   if(!errorFree)
	{
	    alert(theError);
	}
    else
	{
	    theForm.submit()
	}

}//End Health Validation



//Validate HomeImprovement Form
function Check_HomeImprovement(theForm)
{
    var errorFree = true;
    var theError = "You have entered in the following information improperly:";

    if(theForm.fname.value.length == 0)
	{
	    theError += "\n\t-First Name";
	    errorFree = false;
	}

    if(theForm.lname.value.length == 0)
	{
	    theError += "\n\t-Last Name";
	    errorFree = false;
	}

    if(theForm.address1.value.length == 0)
	{
	    theError += "\n\t-Street Address";
	    errorFree = false;
	}

    if(theForm.city.value.length == 0)
	{
	    theError += "\n\t-City";
	    errorFree = false;
	}

    if(theForm.zip_code.value.length !=5 || isNaN(theForm.zip_code.value))
	{
	    theError += "\n\t-Zip Code";
	    errorFree = false;
	}

    if(theForm.day_phone_ac.value.length == 0 || theForm.day_phone_pre.value.length == 0 || theForm.day_phone_num.value.length == 0 || isNaN(theForm.day_phone_ac.value) || isNaN(theForm.day_phone_pre.value) || isNaN(theForm.day_phone_num.value))
	{
	    theError += "\n\t-Day Phone";
	    errorFree = false;
	}

    if(theForm.eve_phone_ac.value.length == 0 || theForm.eve_phone_pre.value.length == 0 || theForm.eve_phone_num.value.length == 0 || isNaN(theForm.eve_phone_ac.value) || isNaN(theForm.eve_phone_pre.value) || isNaN(theForm.eve_phone_num.value))
	{
	    theError += "\n\t-Evening Phone";
	    errorFree = false;
	}

    myRE = new RegExp(".+@.+\..+");
    if(!myRE.test(theForm.email_addr.value))
	{
	    theError += "\n\t-Email Address";
	    errorFree = false;
	}

//      if(theForm.self_employed.options[0].selected && (theForm.years_employed.value.length == 0 || isNaN(theForm.years_employed.value)))
//  	{
//  	    theError += "\n\t-How long have you been with your employer?";
//  	    errorFree = false;
//  	}

//      myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
//      if(!myRE.test(theForm.monthly_gross.value))
//  	{
//  	    theError += "\n\t-How much do you gross each month?";
//  	    errorFree = false;
//  	}

//      myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
//      if(!myRE.test(theForm.monthly_debt.value))
//  	{
//  	    theError += "\n\t-How much do you owe each month?";
//  	    errorFree = false;
//  	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.cash_needed.value))
	{
	    theError += "\n\t-How much cash do you need?";
	    errorFree = false;
	}

    if(theForm.how_long_owned.value.length == 0 || isNaN(theForm.how_long_owned.value))
	{
	    theError += "\n\t-How long have you owned your home?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.home_sale_price.value))
	{
	    theError += "\n\t-Your home's original sale price?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.mortgage_balance.value))
	{
	    theError += "\n\t-Your current mortgage balance?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.monthly_payment.value))
	{
	    theError += "\n\t-Your current mortgage monthly payment?";
	    errorFree = false;
	}

    myRE = /^\d+(\.\d{2})?$/;
    if(!myRE.test(theForm.current_rate.value))
	{
	    theError += "\n\t-Current mortgage interest rate";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.current_worth.value))
	{
	    theError += "\n\t-How much is your home currently worth?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(theForm.second_mortgage.options[1].selected && !myRE.test(theForm.second_balance.value))
	{
	    theError += "\n\t-2nd mortgage balance?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(theForm.second_mortgage.options[1].selected && !myRE.test(theForm.second_payment.value))
	{
	    theError += "\n\t-2nd mortgage monthly payment?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(theForm.second_mortgage.options[1].selected && !myRE.test(theForm.second_rate.value))
	{
	    theError += "\n\t-2nd mortgage interest rate?";
	    errorFree = false;
	}

   if(!errorFree)
	{
	    alert(theError);
	}
    else
	{
	    theForm.submit()
	}

}//End HomeImprovement Validation



//Validate HomeOwners Form
function Check_HomeOwners(theForm)
{
    var errorFree = true;
    var theError = "You have entered in the following information improperly:";

    if(theForm.first_name.value.length == 0)
	{
	    theError += "\n\t-First Name";
	    errorFree = false;
	}

    if(theForm.last_name.value.length == 0)
	{
	    theError += "\n\t-Last Name";
	    errorFree = false;
	}

    if(theForm.real_addr.value.length == 0)
	{
	    theError += "\n\t-Street Address";
	    errorFree = false;
	}

    if(theForm.city.value.length == 0)
	{
	    theError += "\n\t-City";
	    errorFree = false;
	}

    if(theForm.zip_code.value.length !=5 || isNaN(theForm.zip_code.value))
	{
	    theError += "\n\t-Zip Code";
	    errorFree = false;
	}

    if(theForm.day_phone_ac.value.length == 0 || theForm.day_phone_pre.value.length == 0 || theForm.day_phone_num.value.length == 0 || isNaN(theForm.day_phone_ac.value) || isNaN(theForm.day_phone_pre.value) || isNaN(theForm.day_phone_num.value))
	{
	    theError += "\n\t-Day Phone";
	    errorFree = false;
	}

    if(theForm.eve_phone_ac.value.length == 0 || theForm.eve_phone_pre.value.length == 0 || theForm.eve_phone_num.value.length == 0 || isNaN(theForm.eve_phone_ac.value) || isNaN(theForm.eve_phone_pre.value) || isNaN(theForm.eve_phone_num.value))
	{
	    theError += "\n\t-Evening Phone";
	    errorFree = false;
	}

    myRE = new RegExp(".+@.+\..+");
    if(!myRE.test(theForm.email_addr.value))
	{
	    theError += "\n\t-Email Address";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.purchase.value))
	{
	    theError += "\n\t-Purchase Price (or) Replacement cost of your home";
	    errorFree = false;
	}
    
    myRE = /^\d\d\d\d$/;
    if(!myRE.test(theForm.year_built.value))
	{
	    theError += "\n\t-Year Built";
	    errorFree = false;
	}

    if(theForm.square_feet.value.length == 0 || isNaN(theForm.square_feet.value))
	{
	    theError += "\n\t-Square Feet";
	    errorFree = false;
	}

    if(theForm.fireplaces.value.length == 0 || isNaN(theForm.fireplaces.value))
	{
	    theError += "\n\t-Number of Fireplaces";
	    errorFree = false;
	}

    if(theForm.bedrooms.value.length == 0 || isNaN(theForm.bedrooms.value))
	{
	    theError += "\n\t-Number of Bedrooms";
	    errorFree = false;
	}

    if(theForm.bathrooms.value.length == 0 || isNaN(theForm.bathrooms.value))
	{
	    theError += "\n\t-Number of Bathrooms";
	    errorFree = false;
	}

   if(!errorFree)
	{
	    alert(theError);
	}
    else
	{
	    theForm.submit()
	}

}//End HomeOwners Validation



//Validate Life Form
function Check_Life(theForm)
{
    var errorFree = true;
    var theError = "You have entered in the following information improperly:";

    if(theForm.first_name.value.length == 0)
	{
	    theError += "\n\t-First Name";
	    errorFree = false;
	}

    if(theForm.last_name.value.length == 0)
	{
	    theError += "\n\t-Last Name";
	    errorFree = false;
	}

    if(theForm.real_addr.value.length == 0)
	{
	    theError += "\n\t-Street Address";
	    errorFree = false;
	}

    if(theForm.city.value.length == 0)
	{
	    theError += "\n\t-City";
	    errorFree = false;
	}

    if(theForm.zip_code.value.length !=5 || isNaN(theForm.zip_code.value))
	{
	    theError += "\n\t-Zip Code";
	    errorFree = false;
	}

    if(theForm.day_phone_ac.value.length == 0 || theForm.day_phone_pre.value.length == 0 || theForm.day_phone_num.value.length == 0 || isNaN(theForm.day_phone_ac.value) || isNaN(theForm.day_phone_pre.value) || isNaN(theForm.day_phone_num.value))
	{
	    theError += "\n\t-Day Phone";
	    errorFree = false;
	}

    if(theForm.eve_phone_ac.value.length == 0 || theForm.eve_phone_pre.value.length == 0 || theForm.eve_phone_num.value.length == 0 || isNaN(theForm.eve_phone_ac.value) || isNaN(theForm.eve_phone_pre.value) || isNaN(theForm.eve_phone_num.value))
	{
	    theError += "\n\t-Evening Phone";
	    errorFree = false;
	}

    myRE = new RegExp(".+@.+\..+");
    if(!myRE.test(theForm.email_addr.value))
	{
	    theError += "\n\t-Email Address";
	    errorFree = false;
	}

    myRE = /\d\d/;
    if(!myRE.test(theForm.year.value))
	{
	    theError += "\n\t-Birth Year";
	    errorFree = false;
	}

    if(theForm.weight.value.length == 0 || isNaN(theForm.weight.value))
	{
	    theError += "\n\t-Weight";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.paying_per_year.value))
	{
	    theError += "\n\t-Amount Currently Paying Per Year";
	    errorFree = false;
	}

   if(!errorFree)
	{
	    alert(theError);
	}
    else
	{
	    theForm.submit()
	}

}//End Life Validation



//Validate LTC Form
function Check_LTC(theForm)
{
    var errorFree = true;
    var theError = "You have entered in the following information improperly:";

    if(theForm.first_name.value.length == 0)
	{
	    theError += "\n\t-First Name";
	    errorFree = false;
	}

    if(theForm.last_name.value.length == 0)
	{
	    theError += "\n\t-Last Name";
	    errorFree = false;
	}

    if(theForm.real_addr.value.length == 0)
	{
	    theError += "\n\t-Street Address";
	    errorFree = false;
	}

    if(theForm.city.value.length == 0)
	{
	    theError += "\n\t-City";
	    errorFree = false;
	}

    if(theForm.zip_code.value.length !=5 || isNaN(theForm.zip_code.value))
	{
	    theError += "\n\t-Zip Code";
	    errorFree = false;
	}

    if(theForm.day_phone_ac.value.length == 0 || theForm.day_phone_pre.value.length == 0 || theForm.day_phone_num.value.length == 0 || isNaN(theForm.day_phone_ac.value) || isNaN(theForm.day_phone_pre.value) || isNaN(theForm.day_phone_num.value))
	{
	    theError += "\n\t-Day Phone";
	    errorFree = false;
	}

    if(theForm.eve_phone_ac.value.length == 0 || theForm.eve_phone_pre.value.length == 0 || theForm.eve_phone_num.value.length == 0 || isNaN(theForm.eve_phone_ac.value) || isNaN(theForm.eve_phone_pre.value) || isNaN(theForm.eve_phone_num.value))
	{
	    theError += "\n\t-Evening Phone";
	    errorFree = false;
	}

    myRE = new RegExp(".+@.+\..+");
    if(!myRE.test(theForm.email_addr.value))
	{
	    theError += "\n\t-Email Address";
	    errorFree = false;
	}

    myRE = /^\d\d$/;
    if(!myRE.test(theForm.year.value))
	{
	    theError += "\n\t-Year of Birth";
	    errorFree = false;
	}

    if(theForm.weight.value.length == 0 || isNaN(theForm.weight.value))
	{
	    theError += "\n\t-Weight";
	    errorFree = false;
	}

   if(!errorFree)
	{
	    alert(theError);
	}
    else
	{
	    theForm.submit()
	}

}//End LTC Validation



//Validate NewLoan Form
function Check_NewLoan(theForm)
{
    var errorFree = true;
    var theError = "You have entered in the following information improperly:";

    if(theForm.fname.value.length == 0)
	{
	    theError += "\n\t-First Name";
	    errorFree = false;
	}

    if(theForm.lname.value.length == 0)
	{
	    theError += "\n\t-Last Name";
	    errorFree = false;
	}

    if(theForm.address1.value.length == 0)
	{
	    theError += "\n\t-Street Address";
	    errorFree = false;
	}

    if(theForm.city.value.length == 0)
	{
	    theError += "\n\t-City";
	    errorFree = false;
	}

    if(theForm.zip_code.value.length !=5 || isNaN(theForm.zip_code.value))
	{
	    theError += "\n\t-Zip Code";
	    errorFree = false;
	}

    if(theForm.day_phone_ac.value.length == 0 || theForm.day_phone_pre.value.length == 0 || theForm.day_phone_num.value.length == 0 || isNaN(theForm.day_phone_ac.value) || isNaN(theForm.day_phone_pre.value) || isNaN(theForm.day_phone_num.value))
	{
	    theError += "\n\t-Day Phone";
	    errorFree = false;
	}

    if(theForm.eve_phone_ac.value.length == 0 || theForm.eve_phone_pre.value.length == 0 || theForm.eve_phone_num.value.length == 0 || isNaN(theForm.eve_phone_ac.value) || isNaN(theForm.eve_phone_pre.value) || isNaN(theForm.eve_phone_num.value))
	{
	    theError += "\n\t-Evening Phone";
	    errorFree = false;
	}

    myRE = new RegExp(".+@.+\..+");
    if(!myRE.test(theForm.email_addr.value))
	{
	    theError += "\n\t-Email Address";
	    errorFree = false;
	}

    if(theForm.self_employed.options[0].selected && (theForm.years_employed.value.length == 0 || isNaN(theForm.years_employed.value)))
	{
	    theError += "\n\t-How long have you been with your employer?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.monthly_gross.value))
	{
	    theError += "\n\t-How much do you gross each month?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.monthly_debt.value))
	{
	    theError += "\n\t-How much do you owe each month?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.cash_needed.value))
	{
	    theError += "\n\t-How much cash do you need?";
	    errorFree = false;
	}

    if(theForm.how_long_owned.value.length == 0 || isNaN(theForm.how_long_owned.value))
	{
	    theError += "\n\t-How long have you owned your home?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.home_sale_price.value))
	{
	    theError += "\n\t-Your home's original sale price?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.mortgage_balance.value))
	{
	    theError += "\n\t-Your current mortgage balance?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.money_down.value))
	{
	    theError += "\n\t-How much money do you want to put down on your new home?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.plan_to_pay.value))
	{
	    theError += "\n\t-What are you planning to pay for your new home?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.monthly_payment.value))
	{
	    theError += "\n\t-Your current mortgage monthly payment?";
	    errorFree = false;
	}

    myRE = /^\d+(\.\d{2})?$/;
    if(!myRE.test(theForm.current_rate.value))
	{
	    theError += "\n\t-Current mortgage interest rate";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.current_worth.value))
	{
	    theError += "\n\t-How much is your home currently worth?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(theForm.second_mortgage.options[1].selected && !myRE.test(theForm.second_balance.value))
	{
	    theError += "\n\t-2nd mortgage balance?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(theForm.second_mortgage.options[1].selected && !myRE.test(theForm.second_payment.value))
	{
	    theError += "\n\t-2nd mortgage monthly payment?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(theForm.second_mortgage.options[1].selected && !myRE.test(theForm.second_rate.value))
	{
	    theError += "\n\t-2nd mortgage interest rate?";
	    errorFree = false;
	}

   if(!errorFree)
	{
	    alert(theError);
	}
    else
	{
	    theForm.submit()
	}

}//End NewLoan Validation



//Validate Refinance Form
function Check_Refinance(theForm)
{
    var errorFree = true;
    var theError = "You have entered in the following information improperly:";

    if(theForm.fname.value.length == 0)
	{
	    theError += "\n\t-First Name";
	    errorFree = false;
	}

    if(theForm.lname.value.length == 0)
	{
	    theError += "\n\t-Last Name";
	    errorFree = false;
	}

    if(theForm.address1.value.length == 0)
	{
	    theError += "\n\t-Street Address";
	    errorFree = false;
	}

    if(theForm.city.value.length == 0)
	{
	    theError += "\n\t-City";
	    errorFree = false;
	}

    if(theForm.zip_code.value.length !=5 || isNaN(theForm.zip_code.value))
	{
	    theError += "\n\t-Zip Code";
	    errorFree = false;
	}

    if(theForm.day_phone_ac.value.length == 0 || theForm.day_phone_pre.value.length == 0 || theForm.day_phone_num.value.length == 0 || isNaN(theForm.day_phone_ac.value) || isNaN(theForm.day_phone_pre.value) || isNaN(theForm.day_phone_num.value))
	{
	    theError += "\n\t-Day Phone";
	    errorFree = false;
	}

    if(theForm.eve_phone_ac.value.length == 0 || theForm.eve_phone_pre.value.length == 0 || theForm.eve_phone_num.value.length == 0 || isNaN(theForm.eve_phone_ac.value) || isNaN(theForm.eve_phone_pre.value) || isNaN(theForm.eve_phone_num.value))
	{
	    theError += "\n\t-Evening Phone";
	    errorFree = false;
	}

    myRE = new RegExp(".+@.+\..+");
    if(!myRE.test(theForm.email_addr.value))
	{
	    theError += "\n\t-Email Address";
	    errorFree = false;
	}

//      if(theForm.self_employed.options[0].selected && (theForm.years_employed.value.length == 0 || isNaN(theForm.years_employed.value)))
//  	{
//  	    theError += "\n\t-How long have you been with your employer?";
//  	    errorFree = false;
//  	}

//      myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
//      if(!myRE.test(theForm.monthly_gross.value))
//  	{
//  	    theError += "\n\t-How much do you gross each month?";
//  	    errorFree = false;
//  	}

//      myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
//      if(!myRE.test(theForm.monthly_debt.value))
//  	{
//  	    theError += "\n\t-How much do you owe each month?";
//  	    errorFree = false;
//  	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.cash_needed.value))
	{
	    theError += "\n\t-How much cash do you need?";
	    errorFree = false;
	}

    if(theForm.how_long_owned.value.length == 0 || isNaN(theForm.how_long_owned.value))
	{
	    theError += "\n\t-How long have you owned your home?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.home_sale_price.value))
	{
	    theError += "\n\t-Your home's original sale price?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.mortgage_balance.value))
	{
	    theError += "\n\t-Your current mortgage balance?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.monthly_payment.value))
	{
	    theError += "\n\t-Your current mortgage monthly payment?";
	    errorFree = false;
	}

    myRE = /^\d+(\.\d{2})?$/;
    if(!myRE.test(theForm.current_rate.value))
	{
	    theError += "\n\t-Current mortgage interest rate";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.current_worth.value))
	{
	    theError += "\n\t-How much is your home currently worth?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(theForm.second_mortgage.options[1].selected && !myRE.test(theForm.second_balance.value))
	{
	    theError += "\n\t-2nd mortgage balance?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(theForm.second_mortgage.options[1].selected && !myRE.test(theForm.second_payment.value))
	{
	    theError += "\n\t-2nd mortgage monthly payment?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(theForm.second_mortgage.options[1].selected && !myRE.test(theForm.second_rate.value))
	{
	    theError += "\n\t-2nd mortgage interest rate?";
	    errorFree = false;
	}

   if(!errorFree)
	{
	    alert(theError);
	    return false;
	}
    else
	{
	    return true;
	}

}//End Refinance Validation



//Validate Second Form
function Check_Second(theForm)
{
    var errorFree = true;
    var theError = "You have entered in the following information improperly:";

    if(theForm.fname.value.length == 0)
	{
	    theError += "\n\t-First Name";
	    errorFree = false;
	}

    if(theForm.lname.value.length == 0)
	{
	    theError += "\n\t-Last Name";
	    errorFree = false;
	}

    if(theForm.address1.value.length == 0)
	{
	    theError += "\n\t-Street Address";
	    errorFree = false;
	}

    if(theForm.city.value.length == 0)
	{
	    theError += "\n\t-City";
	    errorFree = false;
	}

    if(theForm.zip_code.value.length !=5 || isNaN(theForm.zip_code.value))
	{
	    theError += "\n\t-Zip Code";
	    errorFree = false;
	}

    if(theForm.day_phone_ac.value.length == 0 || theForm.day_phone_pre.value.length == 0 || theForm.day_phone_num.value.length == 0 || isNaN(theForm.day_phone_ac.value) || isNaN(theForm.day_phone_pre.value) || isNaN(theForm.day_phone_num.value))
	{
	    theError += "\n\t-Day Phone";
	    errorFree = false;
	}

    if(theForm.eve_phone_ac.value.length == 0 || theForm.eve_phone_pre.value.length == 0 || theForm.eve_phone_num.value.length == 0 || isNaN(theForm.eve_phone_ac.value) || isNaN(theForm.eve_phone_pre.value) || isNaN(theForm.eve_phone_num.value))
	{
	    theError += "\n\t-Evening Phone";
	    errorFree = false;
	}

    myRE = new RegExp(".+@.+\..+");
    if(!myRE.test(theForm.email_addr.value))
	{
	    theError += "\n\t-Email Address";
	    errorFree = false;
	}

//      if(theForm.self_employed.options[0].selected && (theForm.years_employed.value.length == 0 || isNaN(theForm.years_employed.value)))
//  	{
//  	    theError += "\n\t-How long have you been with your employer?";
//  	    errorFree = false;
//  	}

//      myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
//      if(!myRE.test(theForm.monthly_gross.value))
//  	{
//  	    theError += "\n\t-How much do you gross each month?";
//  	    errorFree = false;
//  	}

//      myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
//      if(!myRE.test(theForm.monthly_debt.value))
//  	{
//  	    theError += "\n\t-How much do you owe each month?";
//  	    errorFree = false;
//  	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.cash_needed.value))
	{
	    theError += "\n\t-How much cash do you need?";
	    errorFree = false;
	}

    if(theForm.how_long_owned.value.length == 0 || isNaN(theForm.how_long_owned.value))
	{
	    theError += "\n\t-How long have you owned your home?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.home_sale_price.value))
	{
	    theError += "\n\t-Your home's original sale price?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.mortgage_balance.value))
	{
	    theError += "\n\t-Your current mortgage balance?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.monthly_payment.value))
	{
	    theError += "\n\t-Your current mortgage monthly payment?";
	    errorFree = false;
	}

    myRE = /^\d+(\.\d{2})?$/;
    if(!myRE.test(theForm.current_rate.value))
	{
	    theError += "\n\t-Current mortgage interest rate";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(!myRE.test(theForm.current_worth.value))
	{
	    theError += "\n\t-How much is your home currently worth?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(theForm.second_mortgage.options[1].selected && !myRE.test(theForm.second_balance.value))
	{
	    theError += "\n\t-2nd mortgage balance?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(theForm.second_mortgage.options[1].selected && !myRE.test(theForm.second_payment.value))
	{
	    theError += "\n\t-2nd mortgage monthly payment?";
	    errorFree = false;
	}

    myRE = /^\d+(,\d{3})*(\.\d{2})?$/;
    if(theForm.second_mortgage.options[1].selected && !myRE.test(theForm.second_rate.value))
	{
	    theError += "\n\t-2nd mortgage interest rate?";
	    errorFree = false;
	}
    
   if(!errorFree)
	{
	    alert(theError);
	}
    else
	{
	    theForm.submit()
	}

}//End Second Validation

