function getSearchBoxUpdateTowns()
{
	var xmlHttp;

	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}

	xmlHttp.onreadystatechange=function()
	{
		if( xmlHttp.readyState == 4 )
		{
			document.getElementById("ajaxsearchbox").innerHTML=xmlHttp.responseText;
		}
	}

	townUpdateID = document.getElementById("selecttownupdate");
    propertytypeSelectID = document.getElementById("selectpropertytype");

	categoryUpdateID.innerHTML = "Updating........";

	xmlHttp.open("GET","http://www.barnsdales.co.uk/rightsearch.php?t=" + propertytypeSelectID.value + "&rightsearchajax=1",true);
	xmlHttp.send(null);
}


function getSearchBoxUpdateSuberbs()
{
	var xmlHttp;

	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}

	xmlHttp.onreadystatechange=function()
	{
		if( xmlHttp.readyState == 4 )
		{
			document.getElementById("ajaxsearchbox").innerHTML=xmlHttp.responseText;
		}
	}

	townUpdateID = document.getElementById("selecttownupdate");
        propertytypeSelectID = document.getElementById("selectpropertytype");
        townSelectID = document.getElementById("selecttown");

	townUpdateID.innerHTML = "Updating........";

	xmlHttp.open("GET","http://www.barnsdales.co.uk/rightsearch.php?t=" + propertytypeSelectID.value + "&town=" + townSelectID.value + "&rightsearchajax=1",true);
	xmlHttp.send(null);
}

function getSearchBoxUpdatePropertyType()
{
	var xmlHttp;

	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}

	xmlHttp.onreadystatechange=function()
	{
		if( xmlHttp.readyState == 4 )
		{
			document.getElementById("ajaxsearchbox").innerHTML = xmlHttp.responseText;
		}
	}

	propertytypeUpdateID = document.getElementById("propertytypeupdate");
        propertytypeSelectID = document.getElementById("selectpropertytype");

	propertytypeUpdateID.innerHTML = "Updating........";

	xmlHttp.open("GET","http://www.barnsdales.co.uk/rightsearch.php?t=" + propertytypeSelectID.value + "&rightsearchajax=1",true);
	xmlHttp.send(null);
}

function getSearchBoxUpdateTowns2()
{
	var xmlHttp;

	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}

	xmlHttp.onreadystatechange=function()
	{
		if( xmlHttp.readyState == 4 )
		{
			document.getElementById("ajaxsearchbox").innerHTML=xmlHttp.responseText;
		}
	}

	
	townUpdateID = document.getElementById("townupdate");
    propertytypeSelectID = document.getElementById("selectpropertytype");
    townSelectID = document.getElementById("selecttown");

	townUpdateID.innerHTML = "Updating........";

	xmlHttp.open("GET","http://www.barnsdales.co.uk/rightsearch.php?t=" + propertytypeSelectID.value + "&town=" + townSelectID.value + "&rightsearchajax=1",true);
	xmlHttp.send(null);
}

function getSearchBoxUpdateSuburbs2()
{
	var xmlHttp;

	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}

	xmlHttp.onreadystatechange=function()
	{
		if( xmlHttp.readyState == 4 )
		{
			document.getElementById("ajaxsearchbox").innerHTML=xmlHttp.responseText;
		}
	}

	suburbUpdateID = document.getElementById("suburbupdate");
    propertytypeSelectID = document.getElementById("selectpropertytype");
    townSelectID = document.getElementById("selecttown");
	suburbSelectID = document.getElementById("selectsuburb");

	suburbUpdateID.innerHTML = "Updating........";

	xmlHttp.open("GET","http://www.barnsdales.co.uk/rightsearch.php?t=" + propertytypeSelectID.value + "&town=" + townSelectID.value + "&locality=" + suburbSelectID.value + "&rightsearchajax=1",true);
	xmlHttp.send(null);
}

function getSearchBoxUpdateBedrooms()
{
	var xmlHttp;

	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}

	xmlHttp.onreadystatechange=function()
	{
		if( xmlHttp.readyState == 4 )
		{
			document.getElementById("ajaxsearchbox").innerHTML=xmlHttp.responseText;
		}
	}

	bedroomsUpdateID = document.getElementById("bedroomsupdate");
    propertytypeSelectID = document.getElementById("selectpropertytype");
    townSelectID = document.getElementById("selecttown");
	suburbSelectID = document.getElementById("selectsuburb");
	bedroomsSelectID = document.getElementById("selectbedrooms");

	bedroomsUpdateID.innerHTML = "Updating........";

	xmlHttp.open("GET","http://www.barnsdales.co.uk/rightsearch.php?t=" + propertytypeSelectID.value + "&town=" + townSelectID.value + "&locality=" + suburbSelectID.value + "&bedrooms=" + bedroomsSelectID.value + "&rightsearchajax=1",true);
	xmlHttp.send(null);
}