/********************************************************************************************
	Author 		: Suraj
	Date		: 10-Aug-2010
	Purpose		: Show the location list based on the state selection
	Updated By	: 
	Date		: 
********************************************************************************************/
var xmlHttpLocation
var loadstatustext="<FONT style=BACKGROUND-COLOR: #990033 color=#ff0033><STRONG><FONT color=#123B69>&nbsp;Loading....</FONT></STRONG></FONT>";
function showLocation(stateId) {
	//alert(stateId);
	if (stateId.length == 0) { 
		return;
	}
	
	xmlHttpLocation = getHTTPObject()
	if (xmlHttpLocation==null) {
		alert ("Browser does not support HTTP Request");
		return;
	}
	//alert(xmlHttpLocation);
	var url="php/show_location.php";

	url = url+"?stateId="+stateId;
	//alert(url);
	url = url+"&stid="+Math.random();
	xmlHttpLocation.onreadystatechange=state_changed_show_location;
	xmlHttpLocation.open("GET",url,true);
	xmlHttpLocation.send(null);

	alert(stateId);
} 
	
function state_changed_show_location()  { 
	if (xmlHttpLocation.readyState == 4 || xmlHttpLocation.readyState == "complete") {
		document.getElementById('location').innerHTML = xmlHttpLocation.responseText;
		//alert(xmlHttpLocation.responseText);
		showArea(0);
	} 
} 
