function getHTTPObject()
{
	var xmlHttp;
	try
	{
		xmlHttp=new XMLHttpRequest(); 		// Firefox, Opera 8.0+, Safari
		return xmlHttp;
	}
	catch (e)
	{
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer
			return xmlHttp;
		}
		catch (e)
		{
			try
			{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
				return xmlHttp;			
			}
			catch (e)
			{
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}	 
}
httpObject = getHTTPObject();  
function selectCountry(countryid)
{
  	if (httpObject!="") 
	{ 
 			var params; 
  			params = "&countryid="+countryid; 
  			document.getElementById("statecity").innerHTML = "";
			document.getElementById("statecity").innerHTML = "";
 		 	httpObject.open("POST", "getcity.php",true); 
			httpObject.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
			httpObject.setRequestHeader("Content-length", params.length);
			httpObject.setRequestHeader("Connection", "close");
			httpObject.send(params); 
			httpObject.onreadystatechange = function(){
				if(httpObject.readyState==4)
				{
					var results = Trim(httpObject.responseText);  
					document.getElementById("statecity").innerHTML = ""; 
					document.getElementById("statecity").innerHTML = results;
				}	
			}		 
 	}
} 
function changeallstar(concertid)
{
 	if (httpObject!="") 
	{ 
 			var params; 
  			params = "&concertid="+concertid; 
  			document.getElementById("overallrating").innerHTML = "";
 		 	httpObject.open("POST", "getoverall.php",true); 
			httpObject.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
			httpObject.setRequestHeader("Content-length", params.length);
			httpObject.setRequestHeader("Connection", "close");
			httpObject.send(params); 
			httpObject.onreadystatechange = function(){
				if(httpObject.readyState==4)
				{
					var results = Trim(httpObject.responseText);
 					document.getElementById("overallrating").innerHTML = results;
				}	
			}		 
 	}
}
function Trim(s) 
{
	while ((s.substring(0,1) == ' ') || (s.substring(0,1) == '\n') || (s.substring(0,1) == '\r'))
	{
		s = s.substring(1,s.length);
	}
	while ((s.substring(s.length-1,s.length) == ' ') || (s.substring(s.length-1,s.length) == '\n') || 	(s.substring(s.length-1,s.length) == '\r'))
	{
		s = s.substring(0,s.length-1);
	}
	return s;
}

