<!-- hide from older browsers

function checkCode(pcObj) {
	var isOk = true;
	var pc = pcObj.value.replace(/ /g, "").toUpperCase();
	
  //do checks
  if (pc.search(/[\\\/\-\+\*\%\£\$\!\^\|\<\>\?\&\=\"\#\[\]]/g) != -1) {
  	isOk = false;
  }
  if ((pc.search(/[A-Z]/g) == -1) || (pc.search(/[0-9]/g) == -1)) {
  	isOk = false;
  }
  else if (!(isNaN(pc.charAt(0)))){
  	isOk = false;
  }
  else if ((pc.length < 5) || (pc.length > 8)) {
  	isOk = false;
  }
  
  if (!isOk) {
  	alert("\"" + pc + "\" is not a valid postcode.\n\nYou need to enter a complete code, such as W12 7RJ,\nbecause postcode areas and constituency areas do not always overlap.");
	pcObj.focus();
  }
  
  return isOk;
  
}

		
function changeSearch() {
	if (eval("document.searchForm.searchby[1].checked")) {
		document.searchForm.action = "http://newssearch.bbc.co.uk/cgi-bin/search/results.pl";
		document.searchForm['q'].value = document.searchForm['loc'].value;
		return true;
		}
		else {
			document.searchForm.action = "http://www.bbc.co.uk/cgi-perl/whereilive/server/bouncer_api.pl";
			return checkCode(document.searchForm['loc']);
		}
	}
//-->