function checkSearchForm(form,pageAction)
{
	// Validate Form - for postcode syntax etc.
	var search_by = "postcode"; // default value;
	var radio_searchby = form.search_by;
	for (i=0; i<radio_searchby.length; i++) {
		if (radio_searchby[i].checked == true) {
			search_by = radio_searchby[i].value;
		}
	}

	if (search_by == "postcode")
	{
		inObj = document.getElementById('search_string');
		if (CheckPostcode(inObj))
		{
			ajax_findPostcode(inObj,'postcode','location',pageAction);
		}
	} 
	else if ((search_by == "placename") || (search_by == "parish") || (search_by == "regdistrict"))
	{
		inObj = document.getElementById('search_string');
		var strPlacename = inObj.value;
		var strType = (search_by == "regdistrict") ? "registration district" : search_by;
		if ((strPlacename=="") || (strPlacename==null))
		{
			alert("Please enter a " + strType + ".");
		} else {
			ajax_showPlacenames(inObj,search_by,'location',pageAction);
		}
	}
}

function updateMapBrowse()
{
	var mapx = document.getElementById('search_string_x').value;
	var mapy = document.getElementById('search_string_y').value;
	var myKaMap = frames['mapview'].document.kaCurrentTool.kaMap;
	myKaMap.zoomTo(mapx,mapy);
}
	