function countcountycreches_new(county){

	
	var ajaxRequest;  // The variable that makes Ajax possible!
	var sorttype = sorttype;
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			//document.myForm.time.value = ajaxRequest.responseText;
			document.getElementById('detailnavdescription').innerHTML=ajaxRequest.responseText;
		}
	}
	
	//var querystring = "?searchtype=" + searchtype;  
	
	//ajaxRequest.open("GET","searchrecords.php" + queryString, true);
	ajaxRequest.open("GET","scripts/php/countcountycreches_new.php?county="+county, true);
	ajaxRequest.send(null); 
}


function listmembercreches_new(county){

	var ajaxRequest;  // The variable that makes Ajax possible!
	var sorttype = sorttype;
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			//document.myForm.time.value = ajaxRequest.responseText;
			document.getElementById('countymemberslist').innerHTML=ajaxRequest.responseText;
		}
	}
	
	//var querystring = "?searchtype=" + searchtype;  
	
	//ajaxRequest.open("GET","searchrecords.php" + queryString, true);
	ajaxRequest.open("GET","scripts/php/listcountymembers_new.php?county="+county, true);
	ajaxRequest.send(null); 
}

function showtowndistrictname_new(towndistrict) {
var selectedtowndistrict;
selectedtowndistrict = towndistrict;
document.getElementById('countylocationholder').innerHTML=selectedtowndistrict;
}

function cleartowndistrictname_new() {

document.getElementById('countylocationholder').innerHTML=" ";
}



function returncountycrechestowndistrict(towndistrict){

	var ajaxRequest;  // The variable that makes Ajax possible!
	var sorttype = sorttype;
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			//document.myForm.time.value = ajaxRequest.responseText;
			document.getElementById('nonmembers').innerHTML=ajaxRequest.responseText;
		}
	}
	
	//var querystring = "?searchtype=" + searchtype;  
	
	//ajaxRequest.open("GET","searchrecords.php" + queryString, true);
	ajaxRequest.open("GET","scripts/php/returntowndistrict.php?towndistrict="+towndistrict, true);
	ajaxRequest.send(null); 


	//now we do it all again for members

	
	var ajaxRequest2;  // The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest2 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest2 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest2 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest2.onreadystatechange = function(){
		if(ajaxRequest2.readyState == 4){
			//document.myForm.time.value = ajaxRequest.responseText;
			document.getElementById('members').innerHTML=ajaxRequest2.responseText;
		}
	}
	
	//var querystring = "?searchtype=" + searchtype;  
	
	//ajaxRequest.open("GET","searchrecords.php" + queryString, true);
	ajaxRequest2.open("GET","scripts/php/returntowndistrictmembers.php?towndistrict="+towndistrict, true);
	ajaxRequest2.send(null);


}



function showcurrentsearch_new(towndistrict) {

var selectedtowndistrict;
selectedtowndistrict = towndistrict;
document.getElementById('countynowshowingmembers').innerHTML="member creches in "+selectedtowndistrict+":";
document.getElementById('countynowshowingnonmembers').innerHTML="non-member creches in "+selectedtowndistrict+":";
}


function togglelayer( whichLayer ){

var elem, vis;  
if( document.getElementById ) // this is the way the standards work
	elem = document.getElementById( whichLayer );  
else if( document.all ) // this is the way old msie versions work
elem = document.all[whichLayer];  
else if( document.layers ) // this is the way nn4 works
elem = document.layers[whichLayer];
vis = elem.style;  // if the style.display value is blank we try to figure it out here
if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';  
vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}


function switchonlayer(boxid){
   document.getElementById(boxid).style.display='block';
}

function switchofflayer(boxid){
   document.getElementById(boxid).style.display='none';
}
