function CheckForm() {

		if (document.theform.Your_Salary.value == "")
			{ 
				window.alert("Please complete YOUR SALARY field.");
				document.theform.Your_Salary.focus();
				return false;
			}

		else if ((document.theform.Your_Salary.value * 1) != document.theform.Your_Salary.value)
			{ 
				window.alert("Please enter a number in YOUR SALARY field.");
				document.theform.Your_Salary.focus();
				return false;
			}

		else if ((document.theform.Your_Bonus.value * 1) != document.theform.Your_Bonus.value)
			{ 
				window.alert("Please enter a number in YOUR BONUS field.");
				document.theform.Your_Bonus.focus();
				return false;
			}
			
		else if ((document.theform.Partners_Salary.value * 1) != document.theform.Partners_Salary.value)
			{ 
				window.alert("Please enter a number in PARTNER'S SALARY field.");
				document.theform.Partners_Salary.focus();
				return false;
			}
			
		else if ((document.theform.Partners_Bonus.value * 1) != document.theform.Partners_Bonus.value)
			{ 
				window.alert("Please enter a number in PARTNER'S BONUS field.");
				document.theform.Partners_Bonus.focus();
				return false;
			}
			
		else if ((document.theform.Other_Income.value * 1) != document.theform.Other_Income.value)
			{ 
				window.alert("Please enter a number in OTHER INCOME field.");
				document.theform.Other_Income.focus();
				return false;
			}
			
		else if ((document.theform.Social_Security_Benefit.value * 1) != document.theform.Social_Security_Benefit.value)
			{ 
				window.alert("Please enter a number in SOCIAL SECURITY BENEFIT field.");
				document.theform.Social_Security_Benefit.focus();
				return false;
			}
			
		else if (document.theform.Mortgage_Rent.value == "")
			{ 
				window.alert("Please complete MORTGAGE/RENT field.");
				document.theform.Mortgage_Rent.focus();
				return false;
			}
			
		else if ((document.theform.Mortgage_Rent.value * 1) != document.theform.Mortgage_Rent.value)
			{ 
				window.alert("Please enter a number in MORTGAGE/RENT field.");
				document.theform.Mortgage_Rent.focus();
				return false;
			}
			
		else if ((document.theform.Council_Tax.value * 1) != document.theform.Council_Tax.value)
			{ 
				window.alert("Please enter a number in COUNCIL TAX field.");
				document.theform.Council_Tax.focus();
				return false;
			}
			
		else if ((document.theform.Electricity.value * 1) != document.theform.Electricity.value)
			{ 
				window.alert("Please enter a number in ELECTRICITY field.");
				document.theform.Electricity.focus();
				return false;
			}
			
		else if ((document.theform.TV_Licence.value * 1) != document.theform.TV_Licence.value)
			{ 
				window.alert("Please enter a number in TV LICENCE field.");
				document.theform.TV_Licence.focus();
				return false;
			}
			
		else if ((document.theform.Gas.value * 1) != document.theform.Gas.value)
			{ 
				window.alert("Please enter a number in GAS field.");
				document.theform.Gas.focus();
				return false;
			}
			
		else if ((document.theform.Car_Road_Tax.value * 1) != document.theform.Car_Road_Tax.value)
			{ 
				window.alert("Please enter a number in CARS ROAD TAX field.");
				document.theform.Car_Road_Tax.focus();
				return false;
			}
			
		else if ((document.theform.Water.value * 1) != document.theform.Water.value)
			{ 
				window.alert("Please enter a number in WATER field.");
				document.theform.Water.focus();
				return false;
			}
			
		else if ((document.theform.Other_Utilities.value * 1) != document.theform.Other_Utilities.value)
			{ 
				window.alert("Please enter a number in OTHER UTILITY COSTS field.");
				document.theform.Other_Utilities.focus();
				return false;
			}
			
		else if ((document.theform.Telephone.value * 1) != document.theform.Telephone.value)
			{ 
				window.alert("Please enter a number in TELEPHONE field.");
				document.theform.Telephone.focus();
				return false;
			}
			
		else if ((document.theform.Life_Insurance.value * 1) != document.theform.Life_Insurance.value)
			{ 
				window.alert("Please enter a number in LIFE INSURANCE field.");
				document.theform.Life_Insurance.focus();
				return false;
			}
			
		else if ((document.theform.Endowment_Policies.value * 1) != document.theform.Endowment_Policies.value)
			{ 
				window.alert("Please enter a number in ENDOWMENT POLICIES field.");
				document.theform.Endowment_Policies.focus();
				return false;
			}
			
		else if ((document.theform.Health_Insurance.value * 1) != document.theform.Health_Insurance.value)
			{ 
				window.alert("Please enter a number in HEALTH INSURANCE field.");
				document.theform.Health_Insurance.focus();
				return false;
			}
			
		else if ((document.theform.Pension.value * 1) != document.theform.Pension.value)
			{ 
				window.alert("Please enter a number in PENSION field.");
				document.theform.Pension.focus();
				return false;
			}
			
		else if ((document.theform.Car_Insurance.value * 1) != document.theform.Car_Insurance.value)
			{ 
				window.alert("Please enter a number in CAR INSURANCE field.");
				document.theform.Car_Insurance.focus();
				return false;
			}
			
		else if ((document.theform.House_Insurance.value * 1) != document.theform.House_Insurance.value)
			{ 
				window.alert("Please enter a number in HOUSE INSURANCE field.");
				document.theform.House_Insurance.focus();
				return false;
			}

		else if (document.theform.Food.value == "")
			{ 
				window.alert("Please complete FOOD field.");
				document.theform.Food.focus();
				return false;
			}
			
		else if ((document.theform.Food.value * 1) != document.theform.Food.value)
			{ 
				window.alert("Please enter a number in FOOD field.");
				document.theform.Food.focus();
				return false;
			}
			
		else if ((document.theform.House_Maintenance.value * 1) != document.theform.House_Maintenance.value)
			{ 
				window.alert("Please enter a number in HOUSE MAINTENANCE field.");
				document.theform.House_Maintenance.focus();
				return false;
			}
			
		else if ((document.theform.Clothing.value * 1) != document.theform.Clothing.value)
			{ 
				window.alert("Please enter a number in CLOTHING field.");
				document.theform.Clothing.focus();
				return false;
			}
			
		else if ((document.theform.Pet_care.value * 1) != document.theform.Pet_care.value)
			{ 
				window.alert("Please enter a number in PET CARE field.");
				document.theform.Pet_care.focus();
				return false;
			}
			
		else if ((document.theform.Other_Household_Expenditure.value * 1) != document.theform.Other_Household_Expenditure.value)
			{ 
				window.alert("Please enter a number in OTHER HOUSEHOLD EXPENDITURE field.");
				document.theform.Other_Household_Expenditure.focus();
				return false;
			}
			
		else if ((document.theform.Debts.value * 1) != document.theform.Debts.value)
			{ 
				window.alert("Please enter a number in DEBTS field.");
				document.theform.Debts.focus();
				return false;
			}
			
		else if ((document.theform.Dentist_Optician.value * 1) != document.theform.Dentist_Optician.value)
			{ 
				window.alert("Please enter a number in DENTIST/OPTICIAN field.");
				document.theform.Dentist_Optician.focus();
				return false;
			}
			
		else if ((document.theform.Child_Care.value * 1) != document.theform.Child_Care.value)
			{ 
				window.alert("Please enter a number in CHILD CARE field.");
				document.theform.Child_Care.focus();
				return false;
			}
			
		else if ((document.theform.Prescriptions.value * 1) != document.theform.Prescriptions.value)
			{ 
				window.alert("Please enter a number in PRESCRIPTIONS field.");
				document.theform.Prescriptions.focus();
				return false;
			}
			
		else if ((document.theform.Transport_Petrol.value * 1) != document.theform.Transport_Petrol.value)
			{ 
				window.alert("Please enter a number in TRAIN, BUS, PETROL/DIESEL field.");
				document.theform.Transport_Petrol.focus();
				return false;
			}
			
		else if ((document.theform.Other_Monthly_Expenses.value * 1) != document.theform.Other_Monthly_Expenses.value)
			{ 
				window.alert("Please enter a number in OTHER MONTHLY EXPENSES field.");
				document.theform.Other_Monthly_Expenses.focus();
				return false;
			}
			
		else if (document.theform.Name.value == "")
			{ 
				window.alert("Please give us your name.");
				document.theform.Name.focus();
				return false;
			}
			
		else if (document.theform.Telephone_Number.value == "")
			{ 
				window.alert("Please give us your telephone number.");
				document.theform.Telephone_Number.focus();
				return false;
			}
			
		else if (document.theform.Email_Address.value == "")
			{ 
				window.alert("Please give us your email address.");
				document.theform.Email_Address.focus();
				return false;
			}
		
		else {
				
				ShowResult();
				return true;
				
			}
			
}

function ShowResult() {

	All_Income = document.theform.Your_Salary.value * 1;
	All_Income += document.theform.Your_Bonus.value * 1;
	All_Income += document.theform.Partners_Salary.value * 1;
	All_Income += document.theform.Partners_Bonus.value * 1;
	All_Income += document.theform.Other_Income.value * 1;
	All_Income += document.theform.Social_Security_Benefit.value * 1;
	
	All_Expenses = document.theform.Mortgage_Rent.value * 1;
	All_Expenses += document.theform.Council_Tax.value * 1;
	All_Expenses += document.theform.Electricity.value * 1;
	All_Expenses += document.theform.TV_Licence.value * 1;
	All_Expenses += document.theform.Gas.value * 1;
	All_Expenses += document.theform.Car_Road_Tax.value * 1;
	All_Expenses += document.theform.Water.value * 1;
	All_Expenses += document.theform.Other_Utilities.value * 1;
	All_Expenses += document.theform.Telephone.value * 1;
	All_Expenses += document.theform.Life_Insurance.value * 1;
	All_Expenses += document.theform.Endowment_Policies.value * 1;
	All_Expenses += document.theform.Health_Insurance.value * 1;
	All_Expenses += document.theform.Pension.value * 1;
	All_Expenses += document.theform.Car_Insurance.value * 1;
	All_Expenses += document.theform.House_Insurance.value * 1;
	All_Expenses += document.theform.Food.value * 1;
	All_Expenses += document.theform.House_Maintenance.value * 1;
	All_Expenses += document.theform.Clothing.value * 1;
	All_Expenses += document.theform.Pet_care.value * 1;
	All_Expenses += document.theform.Other_Household_Expenditure.value * 1;
	All_Expenses += document.theform.Debts.value * 1;
	All_Expenses += document.theform.Dentist_Optician.value * 1;
	All_Expenses += document.theform.Child_Care.value * 1;
	All_Expenses += document.theform.Prescriptions.value * 1;
	All_Expenses += document.theform.Transport_Petrol.value * 1;
	All_Expenses += document.theform.Other_Monthly_Expenses.value * 1;

	message1 = "Your Total Monthly Income: £" + All_Income;
	message2 = "\nYour Total Monthly Expenses: £" + All_Expenses;
	
	if (All_Income > All_Expenses) {
		message3 = "\nYou earn £" + (All_Income-All_Expenses) + " more than you spend each month.";
	}
	else {
		message3 = "\nYou spend £" + (All_Expenses-All_Income) + " more than you earn each month.";
	}
	
	alert (message1 + message2 + "\n-----------------------------------------------------------------" + message3 + "\n-----------------------------------------------------------------");
}