function Form_Validator(theForm)
{
	if (theForm.txtContact.value == ""){
		alert("Please enter your name");
		theForm.txtContact.focus();
		return false;
	}
	if (theForm.txtAddr1.value == ""){
		alert("Please enter the Address.");
		theForm.txtAddr1.focus();
		return (false);
	}
	if (theForm.txtTown.value == ""){
		alert("Please enter the Town/City.");
		theForm.txtTown.focus();
		return (false);
	}
	if (theForm.lstCountry.value == 0){
		alert("Please select the Country.");
		theForm.lstCountry.focus();
		return (false);
	}
	if (theForm.txtEmail.value == ""){
    	alert("Please enter a value for the \"email\" field.");
    	theForm.txtEmail.focus();
    	return (false);
 	}
	if (!isEmailAddr(theForm.txtEmail.value)){
	    alert("Please enter an email address in the form: name@domain.com");
		theForm.txtEmail.focus();
		return (false);
	}
	if (theForm.txtEmail.value.length < 3){
		alert("Please enter at least 3 characters in the \"email\" field.");
		theForm.txtEmail.focus();
		return (false);
	}
	if (theForm.txtEnquiry.value == ""){
		alert("Please enter your enquiry");
		theForm.txtEnquiry.focus();
		return false;
	}
	return true
 }
function isEmailAddr(email){var result = false
	var theStr = new String(email)
	var index = theStr.indexOf("@");
	if (index > 0)
	{
		var pindex = theStr.indexOf(".",index);
		if ((pindex > index+1) && (theStr.length > pindex+1))
		result = true;
	}
	return result;
}