function validate(theForm){			if (theForm.firstname.value == "")	{	alert("Please enter your first name.");	theForm.firstname.focus();	return (false);	}		// check to see if the field is blank	if (theForm.surname.value == "")	{	alert("Please enter your surname.");	theForm.surname.focus();	return (false);	}	if (theForm.hometelephone.value == "")	{	alert("Please enter your home telephone.");	theForm.hometelephone.focus();	return (false);	}		//	if (theForm.numberofdependants.value == "")//	{//	alert("Please enter number of dependants.");//	theForm.numberofdependants.focus();//	return (false);//	}	if (theForm.housename.value == "")	{	alert("Please enter your House Name / Number.");	theForm.housename.focus();	return (false);	}		if (theForm.road.value == "")	{	alert("Please enter your Road.");	theForm.road.focus();	return (false);	}		if (theForm.town.value == "")	{	alert("Please enter your Town.");	theForm.town.focus();	return (false);	}		if (theForm.country.value == "")	{	alert("Please enter your Country.");	theForm.country.focus();	return (false);	}		if (theForm.postcode.value == "")	{	alert("Please enter your postcode.");	theForm.postcode.focus();	return (false);	}//	if (theForm.howlongataddress.value == "")//	{//	alert("Please enter how long at this address.");//	theForm.howlongataddress.focus();//	return (false);//	}	if (theForm.loanamountrequired.value == "")	{	alert("Please enter loan amount required.");	theForm.loanamountrequired.focus();	return (false);	}//	if (theForm.loanreason.value == "")//	{//	alert("Please enter reason for loan.");//	theForm.loanreason.focus();//	return (false);//	}	if (theForm.employersname.value == "")	{	alert("Please enter employers name.");	theForm.employersname.focus();	return (false);	}	if (theForm.jobtitle.value == "")	{	alert("Please enter your jobtitle.");	theForm.jobtitle.focus();	return (false);	}	if (theForm.monthlyincome.value == "")	{	alert("Please enter your monthly income.");	theForm.monthlyincome.focus();	return (false);	}//	if (theForm.howlongcurrentjob.value == "")//	{//	alert("Please enter how long in your current job.");//	theForm.howlongcurrentjob.focus();//	return (false);//	}//	if (theForm.monthlyrent.value == "")//	{//	alert("Please enter your monthly rent/mortgage.");//	theForm.monthlyrent.focus();//	return (false);//	}//	if (theForm.bankname.value == "")//	{//	alert("Please enter your bank name.");//	theForm.bankname.focus();//	return (false);//	}if (theForm.monthlyrent.value == "")	{	alert("Please enter your monthly rent/mortgage.");	theForm.monthlyrent.focus();	return (false);	}//	if (theForm.howlongwithbank.value == "")//	{//	alert("Please enter how long you have been with your bank.");//	theForm.howlongwithbank.focus();//	return (false);//	}//	if (theForm.arrears.value == "")//	{//	alert("Please enter the amount of arrears/ccjs.");//	theForm.arrears.focus();//	return (false);//	}//	if (theForm.numberofcompanies.value == "")//	{//	alert("Please enter the number of companies you owe money.");//	theForm.numberofcompanies.focus();//	return (false);//	}}function enquiry(theForm){		if (theForm.firstname.value == "")	{	alert("Please enter your first name.");	theForm.firstname.focus();	return (false);	}		// check to see if the field is blank	if (theForm.surname.value == "")	{	alert("Please enter your surname.");	theForm.surname.focus();	return (false);	}	if (theForm.hometelephone.value == "")	{	alert("Please enter your home telephone.");	theForm.hometelephone.focus();	return (false);	}			if (theForm.amountofdebt.value == "")	{	alert("Please enter the amount of your debt.");	theForm.amountofdebt.focus();	return (false);	}	if (theForm.creditors.value == "")	{	alert("Please enter your creditors.");	theForm.creditors.focus();	return (false);	}	if (theForm.arrears.value == "")	{	alert("Please enter the amount of arreas/ccjs.");	theForm.arrears.focus();	return (false);	}	}function email(){if (theForm.email.value == "")	{	alert("Please enter your email address.");	theForm.email.focus();	return (false);	}// test if valid email address, must have @ and .var checkEmail = "@.";var checkStr = theForm.email.value;var EmailValid = false;var EmailAt = false;var EmailPeriod = false;for (i = 0;  i < checkStr.length;  i++){ch = checkStr.charAt(i);for (j = 0;  j < checkEmail.length;  j++){if (ch == checkEmail.charAt(j) && ch == "@")EmailAt = true;if (ch == checkEmail.charAt(j) && ch == ".")EmailPeriod = true;	  if (EmailAt && EmailPeriod)		break;	  if (j == checkEmail.length)		break;	}	// if both the @ and . were in the stringif (EmailAt && EmailPeriod){		EmailValid = true		break;	}}	if (!EmailValid)	{	alert("Please enter a valid email address.");	theForm.email.focus();	return (false);	}}