function validateAdvSearch(FormRef)
	{
		// Check that the minimum age selected is not greater than the maximum age
		if (Number(FormRef.minage.value) < 999) {
		if (Number(FormRef.minage.value) < 999) {
			if (Number(FormRef.minage.value) > Number(FormRef.maxage.value)) 
				{ window.alert ("Minimum age is greater than maximum age.\nPlease try again."); return false; }
		}	
		}
		// Check that either a county, town or postcode has been searched for
		if (FormRef.Town.options[FormRef.Town.selectedIndex].text=="Search by town") {
		if (FormRef.county.options[FormRef.county.selectedIndex].text=="Search by county") {
		if (FormRef.areacode.value=="") {
				{ window.alert ("Please be more specific and chose either a town/county or postcode."); return false; }
		}
		}
		}
	}
	
//If county is selected then reset town and vice-versa
function selectCheck(first,second) {  
	var ind = first.selectedIndex;  
	if (ind > 0) {   
		document.getElementById(second).selectedIndex = 0;  
		}  
	} 
