function validatePostCode(postCode){
	
	var alpha = "[abcdefghijklmnopqrstuvwxyz]";
	var valid = false;
	var pcexp = new Array ();
	//for post codes given in the format NNNN AA (N*?)
	pcexp.push (new RegExp ("^([0-9]{4})(\\s*)(" + alpha + "{2})(\\s*)([0-9]*?)$","i"));
	//for post codes given in the format NNNN
	pcexp.push (new RegExp ("^([0-9]{4})$"));
	
	for ( var i=0; i<pcexp.length; i++) {
		if (pcexp[i].test(postCode)) {
			valid = true;
			break;
		}
	}
	if (!valid) {
		alert(PLEASE_ENTER_POST_CODE);
		document.postcode_search.post_code.focus();
		return false;
	}
	return postCode;
}