function getAreas(city_id,lang1,type,area)
{
	//alert(city_id);
	//alert(type);
	if(type == 'order')
	{
		if(city_id!=0)
		{
			document.getElementById('other_city').disabled = true;
			document.getElementById('other_city').value = '';
			document.getElementById('otherarea').value = '';
			document.getElementById('otherarea').disabled = false;
		}
		else
		{
			document.getElementById('other_city').disabled = false;
			document.getElementById('otherarea').disabled = false;
		}
	}
	var componenturl="/modules/ypservices/includes/getareas.php?module=areas&componentid="+city_id+"&action=getAreasByCityId&lang1="+lang1+"&area="+area;
	http3 = new getHTTPObject();
	if (http3) 
	{
		http3.open("GET", componenturl, true);
		http3.send(null);
		http3.onreadystatechange = display_areas;
	}
	function display_areas()
	{
		if(http3.readyState == 4)
		{
			var return_str=http3.responseText;
			document.getElementById("area_div").innerHTML=return_str;
		}
	}
}
function getHTTPObject()
{
	var xmlhttp;
	try
	{
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch (e)
	{
		try 
		{
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	
		}
		catch (E)
		{
			xmlhttp = false;
		}
	
	}
	if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
	{
		try
		{
			xmlhttp = new XMLHttpRequest();
		}
		catch (e)
		{
			xmlhttp = false;
		}
	}
	return xmlhttp;
}
function disableother(val)
{
	if(val!=0)
	{
	document.getElementById('otherarea').disabled = true;
	document.getElementById('otherarea').value = '';
	}
	else
	{
		document.getElementById('otherarea').disabled = false;
	}
}
