
	var xmlHttp;
	//alert(123456);
	function edition_get(val,domain)
	{
		xmlHttp = GetXmlHttpObject();
		if (xmlHttp==null)
		{
		  alert ("Browser does not support HTTP Request");
		  return;
		} 
		
		
		if(val=='stat')
		{
			$('#edition_container').hide(400);
			$('#edition_news').hide(400);
			$('#edition_offer_container').hide(400);
			$('#edit_msg').html('Please select the State where you want to release the Ad.');
			$('#EdiIdImg').show(400);
		}
		else
		{	
			var url = domain+"js/get_edition.php";
			url=url+"?val="+val;
			url=url+"&sid="+Math.random();
		
			xmlHttp.onreadystatechange = stateChangedEditionName;
			xmlHttp.open("GET",url,true);
			xmlHttp.send(null);
		}
	}

	function stateChangedEditionName() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		 {
			values_edi = xmlHttp.responseText.split("|");
			if(values_edi)
			{
				document.getElementById("edition_container").innerHTML = '<img src="./images_home/small_straight_arrow.png" id="CityIdImg" style="vertical-align:middle;" border="0" />'+values_edi[0];
				$('#edition_container').show(400);
				document.getElementById("keep_val").innerHTML = values_edi[1];
				$('#edit_msg').html('Please select the City to view all available Newspapers & Offers.');
				$('#EdiIdImg').hide(400);
				$('#CityIdImg').show(400);
			}
		 } 
	}
	
	function GetXmlHttpObject()
	{
		var xmlHttp=null;
		try
			 {
			 	// Firefox, Opera 8.0+, Safari
			 	xmlHttp=new XMLHttpRequest();
			 }
		catch (e)
			 {
			 // Internet Explorer
				  try
				  {
				  	  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
				  }
				  catch (e)
				  {
					  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
				  }
			 }
			 return xmlHttp;
	}
