function GetNaprav(RegionID)
{
	if(RegionID == 0)
	{
		$(".NaprList").empty();
	}
	else
	{
	$.post('handler.php',
		{
			regionid1: RegionID
		},
		onNaprList
	);
	}
}

function onNaprList(data)
{
	$(".NaprList").empty();
	$(".NaprList").append(data);
}


function GetCity(RegionID)
{
	if(RegionID == 0)
	{
		$(".CityList").empty();
	}
	else
	{
	$.post('handler.php',
		{
			regionid2: RegionID
		},
		onCityList
	);
	}
}

function onCityList(data)
{
	$(".MetroList").empty();
	$(".CityList").empty();
	$(".CityList").append(data);
}


function GetMetro(CityID)
{
	if(CityID == 0)
	{
		$(".MetroList").empty();
	}
	else
	{
	$(".MetroList").empty();
	$(".MetroList").append("<br><img src=http://realtys.ru/img/wait.gif>");
	$.post('handler.php',
		{
			cityid: CityID
		},
		onMetroList
	);
	}
}

function onMetroList(data)
{
	$(".MetroList").empty();
	$(".MetroList").append(data);
}


function myadlist(realtyID,pageID)
{
	$(".RealtyList").empty();
	$(".RealtyList").append("<br><img src=http://realtys.ru/img/waitbig.gif>");
	if(realtyID == 0)
	{
		$(".RealtyList").empty();
	}
	else
	{
	$.post('handler.php',
		{
			realtymyaddid: realtyID,
			pagemyaddid: pageID
		},
		onMyAdList
	);
	}
}

function onMyAdList(data)
{
	$(".RealtyList").empty();
	$(".RealtyList").append(data);
}



