/* */


function getCities(canton, lang, tarea)
{
	var rq_url = "/common/get_cities_json.php?lang=" + lang + "&canton=" + canton;
	
	// Делаем синхронный запрос
	var result = eval(		
		$.ajax({
			type: "GET",
			url: rq_url,
			async: false
		}).responseText
	);
	
	var options_html = "<option value=\"0\">" + $("select#select__city" + tarea + " option[value=\"0\"]").html() + "</option>";
	
	if (typeof result != 'undefined')
	{
		for (var i = 0; i < result.length; i++)
		{
			options_html += '<option value="' + result[i].id + '">' + result[i].name + '</option>';
		}
	}
	
	//alert('options: ' + options_html);
	$("select#select__city" + tarea).html(options_html);
	$("select#select__city" + tarea).resetSS();
	$('div.newListSelected').css('visibility', 'visible');
}
