var xmlHttpMap

function showHint(loc, locsource)
{
document.getElementById("txt1").value=loc;
document.getElementById("location").value=loc;
document.getElementById("txtHint").innerHTML="<img class='loader' src='/accommodation/tabinc/ajaxmap/loading.gif'>";
if (loc.length==0) 
	{ 
	document.getElementById("txtHint").innerHTML="<div class=instructions>Select a location by clicking the name of a region on the map or entering the first few letters into the location box.</div>";
	return;
  }
xmlHttpMap=GetxmlHttpMapObject()
if (xmlHttpMap==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="/accommodation/tabinc/ajaxify.asp";
url=url+"?q="+loc;
if (locsource=="map") { url=url+"&locsource=map" };
url=url+"&sid="+Math.random();
//if (window.location.search.substring(1).indexOf('q=')==-1)
//  {
url=url+"&"+window.location.search.substring(1);
//  } 
xmlHttpMap.onreadystatechange=mapStateChanged;
xmlHttpMap.open("GET",url,true);
xmlHttpMap.send(null);
} 

function mapStateChanged() 
{ 
if (xmlHttpMap.readyState==4)
{ 
document.getElementById("txtHint").innerHTML=xmlHttpMap.responseText;
}
}

function GetxmlHttpMapObject()
{
var xmlHttpMap=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttpMap=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttpMap=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttpMap=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttpMap;
}

function wipeAccBar() {
	if (document.search.category.value=='none') {
		document.search.category.value='0'
	}
	document.search.style.value = 'none';
	document.search.price.value = 'any';
	document.search.sleeps.value = '0';
	document.search.acckeyword.value = 'Keyword';
	document.search.wheelchair.checked = false;	
}

function wipeAttBar() {
	if (document.search.style.value=='none') {
		document.search.style.value='0'
	}
	document.search.category.value = 'none';
	document.search.attkeyword.value = 'Keyword';
}

function clear_acc()
{
if (document.search.acckeyword.value == "Keyword")
	document.search.acckeyword.value = "";
} 

function clear_att()
{
if (document.search.attkeyword.value == "Keyword")
	document.search.attkeyword.value = "";
} 