<!-- Begin

function validate() {

	// Q1
	if (document.frmEnquiry.A1.value=="") {
		alert("Please enter your first name");
		location = 'http://www.holmleagarden.co.uk/enquiry/index.asp#A1top';		
	return false;
	}
	
	// Q2
	if (document.frmEnquiry.A2.value=="") {
		alert("Please enter your last name");
		location = 'http://www.holmleagarden.co.uk/enquiry/index.asp#A2top';
	return false;
	}	
	
	// Q4	
	if (document.frmEnquiry.A4.value == "") {
		alert("Please enter your first line address");
		location = 'http://www.holmleagarden.co.uk/enquiry/index.asp#A4top';
	return false;
	}

	// Q6
	if (document.frmEnquiry.A6.value == "") {
		alert("Please enter your Town");
		location = 'http://www.holmleagarden.co.uk/enquiry/index.asp#A6top';
	return false;
	}
	
	// Q7
	if (document.frmEnquiry.A7.value == "") {
		alert("Please enter your County");
		location = 'http://www.holmleagarden.co.uk/enquiry/index.asp#A7top';
	return false;
	}	
	
	// Q8
	if (document.frmEnquiry.A8.value == "") {
		alert("Please enter your first postcode");
		location = 'http://www.holmleagarden.co.uk/enquiry/index.asp#A8top';
	return false;
	}	
	
	// Q9
	if (document.frmEnquiry.A9.value == "") {
		alert("Please enter your telephone number");
		location = 'http://www.holmleagarden.co.uk/enquiry/index.asp#A9top';
	return false;
	}	

	var checkEmail = "@.";
	var checkStr = document.frmEnquiry.A11.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 (EmailAt && EmailPeriod) {
			EmailValid = true
			break;
		}
	}

	if (!EmailValid) {
		alert("Please enter a valid email address ensuring it contains both @ and . characters");
		location = 'http://www.holmleagarden.co.uk/enquiry/index.asp#A11top';
	return false;
	}
	
	// Q11a
	if (document.frmEnquiry.A11.value != document.frmEnquiry.A11a.value) {
		alert("Please ensure your email address is typed correctly");
		location = 'http://www.holmleagarden.co.uk/enquiry/index.asp#A11top';
	return false;
	}
	
	// Q12
	if (document.frmEnquiry.A12.value == "") {
		alert("Please enter your requirements");
		location = 'http://www.holmleagarden.co.uk/enquiry/index.asp#A12top';
	return false;
	}		

	//Q13
	var listCheckQ13 = document.frmEnquiry.A13.selectedIndex;
	if (document.frmEnquiry.A13.options[listCheckQ13].value == "Please select") {
		alert("Please tell us how you heard of Holmlea Garden");
		location = 'http://www.holmleagarden.co.uk/enquiry/index.asp#A13top';
	return false;
	}	
	
	// Q13other	
	var listCheckQ13 = document.frmEnquiry.A13.selectedIndex;
	if (document.frmEnquiry.A13.options[listCheckQ13].value == "Other" && document.frmEnquiry.Q13other.value == "") {
		alert("Please enter further information regarding how you heard of Holmlea Garden");
		location = 'http://www.holmleagarden.co.uk/enquiry/index.asp#A13othertop';		
	return false;
	}	

	//Q14
	var listCheckQ14 = document.frmEnquiry.A14.selectedIndex;
	if (document.frmEnquiry.A14.options[listCheckQ14].value == "Please select") {
		alert("Please indicate if you wish to join our mailing list");
		location = 'http://www.holmleagarden.co.uk/enquiry/index.asp#A14top';
	return false;
	}
	
	//Q15
	var listCheckQ15 = document.frmEnquiry.A15.selectedIndex;
	if (document.frmEnquiry.A15.options[listCheckQ15].value == "Please select") {
		alert("Please indicate if you wish Holmlea Garden to telephone you back regarding this enquiry");
		location = 'http://www.holmleagarden.co.uk/enquiry/index.asp#A15top';
	return false;
	}	

	Response.Redirect = 'http://www.holmleagarden.co.uk/enquiry/dbConnection.asp'
	
	return true;
	
}
// End -->




		