var xmlHttpServicelocator;

function initServicelocator()
{
	xmlHttpServicelocator=GetXmlHttpObject();

	if (xmlHttpServicelocator==null)
 	{
  		alert ("Your browser does not support AJAX!");
  		return;
	} 
	
	var url;
	
	if (querystring("id")=="")
	{
		url="/ajax.asp?xsl=ajaxservicelocator.xsl&zip="+querystring("zip")+"&dsl_country="+querystring("dsl_country")+"&dsl_state="+querystring("dsl_state");
	}
	else
	{
		url="/ajax.asp?xsl=ajaxservicelocator.xsl&id="+querystring("id");	
	}
	
	url=url+"&sid="+Math.random();

	xmlHttpServicelocator.onreadystatechange=stateChangedServicelocator;
	xmlHttpServicelocator.open("GET",url,true);
	xmlHttpServicelocator.send(null);

	addCSS("/css/tier4/servicelocator/style.css");
} 

function stateChangedServicelocator() 
{ 
	if (xmlHttpServicelocator.readyState==4)
	{ 
		document.getElementById("servicelocatorwidget").innerHTML=xmlHttpServicelocator.responseText;
	}
}
