/*
 * Cafe List Javascript for new Dancemela
 * Date: 2008-01-14
 *  
 */

function GetXmlHttp()
{ 
	var xmlhttp=false;
	//------------------------------------------------------
	//Detect browser and initialize browser specific objects
	//------------------------------------------------------
	browser=navigator.userAgent.toLowerCase();

	if(browser.indexOf("opera")!=-1)
	{
		xmlhttp=new XMLHttpRequest();
	}
	else if(browser.indexOf("msie")!=-1)
	{
		try
		{
		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		//xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
   }
   
   else
	{
		xmlhttp=new XMLHttpRequest();
	}
	
	return xmlhttp;
}

function change_county2(form,countycz_id)
{
			var cid=document.getElementById('county_list2');
			var	xmlhttpcz= GetXmlHttp();
			url='get_areacz.php?countryid='+ countycz_id +'&get=county';
			xmlhttpcz.onreadystatechange=function()
			{
				var result=xmlhttpcz.responseText;
				cid.innerHTML=result; 
			}
			xmlhttpcz.open("GET",url,true)
		    xmlhttpcz.send(null)
 }
 
function change_rs(form,county_id)
{
			var cid1=document.getElementById('county_listrs2');
			var	xmlhttp= GetXmlHttp();
			url='get_arears.php?countryid='+ county_id +'&get=county';
			xmlhttp.onreadystatechange=function()
			{
				
						 var result1=xmlhttp.responseText;
						  cid1.innerHTML=result1; 
						
			}
			xmlhttp.open("GET",url,true)
		    xmlhttp.send(null)
		
  }