	function ValidChars(sText,ValidChars) {
		var IsNumber=true;
		var Char;
		for (i = 0; i < sText.length && IsNumber == true; i++) { 
			Char = sText.charAt(i); 
			if (ValidChars.indexOf(Char) == -1)  {
				IsNumber = false;
			}
		}
		return IsNumber;
	}
	
	function checkform (form) {
		if (form.monthly_income.value == "") {
		 	alert( "Please enter your monthly income" );
		 	form.monthly_income.focus();
			return false;
		}
		if (!ValidChars(form.monthly_income.value,"0123456789")) {
			alert( "Please enter only numbers for your monthly income" );
			form.monthly_income.focus();
			return false;
		}
		if (form.money_saved.value == "") {
		 	alert( "Please enter the amount of money you can put towards your home immediately" );
		 	form.money_saved.focus();
			return false;
		}
		if (!ValidChars(form.money_saved.value,"0123456789.,")) {
			alert( "Please enter only numbers for the amount of money you can put towards your home immediately" );
			form.money_saved.focus();
			return false;
		}
		if (form.replacement_cost.value == "") {
		 	alert( "Please enter the replacement cost" );
		 	form.replacement_cost.focus();
			return false;
		}
		if (!ValidChars(form.replacement_cost.value,"0123456789.,")) {
			alert( "Please enter only numbers for the replacement cost" );
			form.replacement_cost.focus();
			return false;
		}
		if (form.loan_approved_amount.value == "") {
		 	alert( "Please enter the amount of loan you have been approved for" );
		 	form.loan_approved_amount.focus();
			return false;
		}
		if (!ValidChars(form.loan_approved_amount.value,"0123456789.,")) {
			alert( "Please enter only numbers for the amount of loan you have been approved for" );
			form.loan_approved_amount.focus();
			return false;
		}
		if (form.loan_interest_rate.value == "") {
		 	alert( "Please enter the interest rate you have been approved for" );
		 	form.loan_interest_rate.focus();
			return false;
		}
		if (!ValidChars(form.loan_interest_rate.value,"0123456789.,")) {
			alert( "Please enter only numbers for the interest rate you have been approved for" );
			form.loan_interest_rate.focus();
			return false;
		}
		if (form.loan_years.value == "") {
		 	alert( "Please enter the length of your loan, in years" );
		 	form.loan_years.focus();
			return false;
		}
		if (!ValidChars(form.loan_years.value,"0123456789.,")) {
			alert( "Please enter only numbers for the length of your loan, in years" );
			form.loan_years.focus();
			return false;
		}
		if (!ValidChars(form.repair_costs.value,"0123456789.,")) {
			alert( "Please enter only numbers for the cost of repairs" );
			form.repair_costs.focus();
			return false;
		}
		if (!ValidChars(form.furniture_costs.value,"0123456789.,")) {
			alert( "Please enter only numbers for the cost of furniture" );
			form.furniture_costs.focus();
			return false;
		}
		if (!ValidChars(form.monthly_lease_amount.value,"0123456789.,")) {
			alert( "Please enter only numbers for the cost of your lease" );
			form.monthly_lease_amount.focus();
			return false;
		}
		if (!ValidChars(form.lease_months.value,"0123456789")) {
			alert( "Please enter only numbers for the number of months" );
			form.lease_months.focus();
			return false;
		}
		if (!ValidChars(form.winter_temp.value,"0123456789")) {
			alert( "Please enter only whole numbers for the lowest temperature" );
			form.winter_temp.focus();
			return false;
		}
		if (!ValidChars(form.summer_temp.value,"0123456789")) {
			alert( "Please enter only whole numbers for the highest temperature" );
			form.summer_temp.focus();
			return false;
		}
		if (form.sq_footage.value == "") {
		 	alert( "Please enter the square footage of the house" );
		 	form.sq_footage.focus();
			return false;
		}
		if (!ValidChars(form.sq_footage.value,"0123456789,")) {
			alert( "Please enter only numbers for the square footage" );
			form.sq_footage.focus();
			return false;
		}
	}
