<!-- Begin

function CheckPropertyRequiredFields() {
var errormessage = new String();
// Put field checks below this point.

if(!WithoutContent(document.property.sstreet.value))
	{ 
	if (WithoutContent(document.property.stown.value) && WithoutContent(document.property.spostcode.value))
	{
	errormessage += "\n\nAs you have entered something in the \"Street\" field we will require either a \"Town\" or \"Postcode\" to begin your search."; 
	document.getElementById('town').className = "backgrounderror";
	document.getElementById('postcode').className = "backgrounderror";
	}
	}

//if(!WithoutContent(document.property.stown.value))
	//{
	//if (WithoutContent(document.property.sstreet.value))
	//{
	//errormessage += "\n\nAs you have entered something in the \"Town\" field we will require a \"Street\" to begin your search."; 
	//document.getElementById('street').className = "backgrounderror";
	//}
	
	
	}
if (!WithoutContent(document.property.spostcode.value))
	{ 
	if (postcode_validate())
	{ 
	errormessage += "\n\nThe \"Postcode\" entered is not in a recognised Format.\n\nPlease enter a \"FULL\" postcode to begin your search"; 
	document.getElementById('postcode').className = "backgrounderror";
	}
	}





//if(WithoutSelectionValue(document.contactform.country))
	//{ errormessage += "\n\nPlease select your country from the dropdown list."; }	
//if(WithoutCheck(document.contactform.checkLoner))
	//{ errormessage += "\n\nThe \"Loner\" check box must be checked."; }	
//if(NoneWithCheck(document.contactform.checkOne))
	//{ errormessage += "\n\nPlease check one or more check boxes of the set of three."; }			
//if(WithoutCheck(document.contactform.radioLoner))
	//{ errormessage += "\n\nThe \"Loner\" radio button must be clicked."; }
//if(NoneWithContent(document.contactform.oneOrTheOther))
//	{ errormessage += "\n\nSomething must be typed in one or both of the set of form text fields."; }
//if(WithoutContent(document.contactform.FileGet.value))
	//{ errormessage += "\n\nA file name must be provided for uploading."; }


// Put field checks above this point.
if(errormessage.length > 2) {
	alert('NOTE:' + errormessage);
	return false;
	}

return true;
} // end of function CheckPropertyRequiredFields()


function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function NoneWithContent(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].value.length > 0) { return false; }
	}
return true;
}

function NoneWithCheck(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].checked) { return false; }
	}
return true;
}

function WithoutCheck(ss) {
if(ss.checked) { return false; }
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
		if(ss[i].value.length) { return false; }
		}
	}
return true;
}


function postcode_validate()
{
var postcode = document.property.spostcode.value;

var regPostcode = /^([a-zA-Z]){1}([0-9][0-9]|[0-9]|[a-zA-Z][0-9][a-zA-Z]|[a-zA-Z][0-9][0-9]|[a-zA-Z][0-9]){1}([ ])([0-9][a-zA-z][a-zA-z]){1}$/;

if(regPostcode.test(postcode) == false)
{
return true;
}
else
{
return false;
}
}		
//-->




<!-- Begin
	function verify() {
	var themessage = "You are required to complete the following fields: \n";

	if ((document.emailform.senderemail.value=="") || (document.emailform.senderemail.value=='Enter Email')) {
	themessage = themessage + "\n Email Address for E-Newsletter";
	document.emailform.senderemail.value="Enter Email";
	}
	//alert if fields are empty and cancel form submit
	if (themessage == "You are required to complete the following fields: \n") {
	document.emailform.submit();
	}
	else {
	alert(themessage);
	document.emailform.senderemail.focus();
	return false;
	   }
	}
//  End -->


<!-- Begin
	function verifysearch() {
	var themessage = "You are required to complete the following fields: \n";

	if ((document.searchform.keywords.value=="") || (document.searchform.keywords.value=='Search')) {
	themessage = themessage + "\n Search Terms";
	document.searchform.keywords.value="Search";
	}
	//alert if fields are empty and cancel form submit
	if (themessage == "You are required to complete the following fields: \n") {
	document.searchform.submit();
	}
	else {
	alert(themessage);
	document.searchform.keywords.focus();
	return false;
	   }
	}
//  End -->


<!-- Begin
	function jumpPage(newLoc) {
	newPage = newLoc.options[newLoc.selectedIndex].value           	
	if (newPage !="") {
	window.location.href = newPage
	}
	}
//  End -->
            

