function postit(){ //check postcode format is valid
	test = document.form_name.Postcode.value; size = test.length
	test = test.toUpperCase(); //Change to uppercase
	while (test.slice(0,1) == " ") //Strip leading spaces
	{test = test.substr(1,size-1);size = test.length}
	while(test.slice(size-1,size)== " ") //Strip trailing spaces
	{test = test.substr(0,size-1);size = test.length}
	document.form_name.Postcode.value = test; //write back to form field
	 if (size < 6 || size > 8){ //Code length rule
	  alert(test + " is not a valid postcode - wrong length");
	  document.form_name.Postcode.focus();
	  return false;
	 }
	 if (!(isNaN(test.charAt(0)))){ //leftmost character must be alpha character rule
	   alert(test + " is not a valid postcode - cannot start with a number");
	   document.form_name.Postcode.focus();
	   return false;
	  }
	 if (isNaN(test.charAt(size-3))){ //first character of inward code must be numeric rule
	   alert(test + " is not a valid postcode - alpha character in wrong position");
	   document.form_name.Postcode.focus();
	   return false;
	  }
	 if (!(isNaN(test.charAt(size-2)))){ //second character of inward code must be alpha rule
	   alert(test + " is not a valid postcode - number in wrong position");
	   document.form_name.Postcode.focus();
	   return false;
	  }
	 if (!(isNaN(test.charAt(size-1)))){ //third character of inward code must be alpha rule
	   alert(test + " is not a valid postcode - number in wrong position");
	   document.form_name.Postcode.focus();
	   return false;
	  }
	 if (!(test.charAt(size-4) == " ")){//space in position length-3 rule
	   alert(test + " is not a valid postcode - no space or space in wrong position");
	   document.form_name.Postcode.focus();
	   return false;
	   }
	 count1 = test.indexOf(" ");count2 = test.lastIndexOf(" ");
	 if (count1 != count2){//only one space rule
	   alert(test + " is not a valid postcode - only one space allowed");
	   document.form_name.Postcode.focus();
	   return false;
	  }
	//alert("Postcode Format OK");
	verify();
	return true;
}

function verify() {
var themessage = "Please enter the following information: \n";
	if (document.form_name.BusinessName.value=="") {
	themessage = themessage + " - Business Name\n";
	}
	if (document.form_name.Contact1.value=="") {
	themessage = themessage + " - Contact Name\n";
	}
	if (document.form_name.Address1.value=="") {
	themessage = themessage + " - Address Line 1\n";
	}
	if (document.form_name.Country.value=="") {
	themessage = themessage + " - Country\n";
	}
	if ((document.form_name.County.value=="")||(document.form_name.County.value==" - Select a County -")) {
	themessage = themessage + " - County\n";
	}
	if ((document.form_name.Town.value=="")||(document.form_name.Town.value==" - Select a Town -")) {
	themessage = themessage + " - Town/City\n";
	}
	if (document.form_name.Postcode.value=="") {
	themessage = themessage + " - Postcode\n";
	}
	if (document.form_name.Phone1.value=="") {
	themessage = themessage + " - Phone Number\n";
	}
	if (document.form_name.Category.value=="") {
	themessage = themessage + " - Category\n";
	}
	if (document.form_name.acknowledge.checked == false) {
	themessage = themessage + " - Acknowledgement Checkbox\n";
	}

	//alert if fields are empty and cancel form submit
	if (themessage == "Please enter the following information: \n") {
		send_this();
	}
	else {
		alert(themessage);
		return false;
	}
}

function send_this()
{
	document.form_name.submit_button.disabled = true;
	document.form_name.submit_button.value = 'Processing...';
	document.form_name.submit();
}