<!--	
	function validate_form() {		
		if (check_valid_postcode_contents(document.PostCode_Search.Postcode.value) != true){
			alert("Please complete a valid Postcode");
			self.document.PostCode_Search.Postcode.focus();	
			return false;
		}
		else {			
			document.PostCode_Search.submit();
			return true;
		}
	}	
	
	function validate_form1() {		
		if (check_valid_postcode_contents(document.PostCode_Search.Postcode.value) != true){			
			return false;
		}
		else {			
			document.PostCode_Search.submit();
			return true;
		}
	}	

	function check_valid_postcode_contents(inputbox) {
		var teststring
		var outputstring
		teststring  = trim(inputbox.toString())
		if (inputbox == "") {
			return false
		}
		if (isblank(teststring)) {
			return false
		}
		outputstring = removeblank(teststring)		
		if (!isNaN(outputstring)) {
			return false
		}
		if (outputstring.length < 5 || outputstring.length > 8) {
			return false
		}			
		size = teststring.length;
		if (!(isNaN(outputstring.charAt(0)))) {   
   			return false;
  		}
		if (isNaN(teststring.charAt(size-3))){ 
      		return false;
  		}	
		if (!(isNaN(teststring.charAt(size-2)))) {   
   			return false;
  		}	
		if (!(isNaN(teststring.charAt(size-1)))) {
      		return false;
  		}
		if (!(teststring.charAt(size-4) == " ")) {   
   			return false;
   		}
 		count1 = teststring.indexOf(" ");
        count2 = teststring.lastIndexOf(" ");
 		if (count1 != count2){   
   			return false;
  		}
		return true
	}

	function isblank(inbox) {
		for (var i = 0; i <  inbox.length; i++) {
			var c = inbox.charAt(i)
			if (c != " "){		
				return false;
			}
		}
		return true
	}
	
	function removeblank(inbox) {
		var output = ""
		for( var i = 0; i <  inbox.length; i++) {
			var c = inbox.charAt(i)
			if (c != " "){		
				output = output + c			
			}
		}
		return output
	}

	function trim(str)
	{
   		return str.replace(/^\s*|\s*$/g,"");
	}
//-->