function validateContactForm() {
    var fullName = document.contact_form.full_name.value;
	var location = document.contact_form.location.value;
	var phone = document.contact_form.phone.value;
	var query = document.contact_form.query.value;
	var email = document.contact_form.email.value;
	
	if (fullName == "") {
		alert("You must enter your full name.");
		document.contact_form.full_name.focus();
		return false;
	}
	if (location == "") {
		alert("You must enter your location.");
		document.contact_form.location.focus();
		return false;
	}
	if (phone == "" && email == "") {
		alert("You must enter either your phone number or email address.");
		document.contact_form.phone.focus();
		return false;
	}
	if (phone != "" && !isNumeric(phone)) {
		alert("Your phone number can only contain numeric characters");
		document.contact_form.phone.focus();
		return false;
	}
	if (email != "") {
		// E-mail Validation by Henrik Petersen / NetKontoret
		// Explained at www.echoecho.com/jsforms.htm
		// Please do not remove this line and the two lines above.
		apos=email.indexOf("@"); 
		dotpos=email.lastIndexOf(".");
		lastpos=email.length-1;
		if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) {
			alert("You must enter a valid email address");
				document.contact_form.email.focus();
			return false;
		}
	}
	if (query == "") {
		alert("You must enter your comments or query.");
		document.contact_form.query.focus();
		return false;
	}
	return true;
}

function isNumeric(strString) {
	var strValidChars = "0123456789+(). ";
	var strChar;
	var blnResult = true;

	if (strString.length == 0) return false;
	//  test strString consists of valid characters listed above
	for (i = 0; i < strString.length && blnResult == true; i++) {
		strChar = strString.charAt(i);
		if (strValidChars.indexOf(strChar) == -1) {
			blnResult = false;
		}
	}
	return blnResult;
}