function validate() {

	var problems = new String;

	// title
	if (document.apply4me.reasonloan.value=="Please Select") {
		problems+="Please specify purpose for loan\n";
	}
	if (document.apply4me.title.value=="") {
		problems+="Please enter your Title\n";
	}
	if (document.apply4me.forename.value=="") {
		problems+="Please enter your Forename\n";
	}
	if (document.apply4me.surname.value=="") {
		problems+="Please enter your Surname\n";
	}
	if (document.apply4me.address1.value=="") {
		problems+="Please enter your Address\n";
	}
	if (document.apply4me.postcode.value=="") {
		problems+="Please enter your Postcode\n";
	}
		if (document.apply4me.email.value=="") {
		problems+="Please enter your E-mail\n";
	}
		if (document.apply4me.mobileno.value=="") {
		problems+="Please enter your mobile number\n";
	}
	// Now output validation exceptions.
	if (problems.length>0) {
		// Alert user of missing data
		alert("Some of the required data has not been entered:\n\n"+problems+"\n\nPlease complete these fields and submit again.");

	} else {

		// Submit if no problems.
		document.apply4me.submit();
	}

}