function show(obj) {
	if (document.getElementById(obj).style.display == 'block')
	document.getElementById(obj).style.display = 'none';
	else document.getElementById(obj).style.display = 'block';
}


function change_objcnt(cnt) {

	var str = document.location.href;
	str = str.replace(/obj_rows=[\d&]+/gi, '');
	str = str.replace(/npage=[\d&]+/gi, '');
	str = str.replace(/&$/gi, '');
	//var href = window.location;
	if (str.indexOf("?")> -1) window.location=str+'&obj_rows='+cnt;
	else window.location=str+'?obj_rows='+cnt;

}

function Changeicon(sort) 
{
	
	if (gE(sort+"_down").style.display=="none")
	{
		gE(sort+"_down").style.display="";
		gE(sort+"_up").style.display="none";
	}
	else
	{
		gE(sort+"_down").style.display="none";
		gE(sort+"_up").style.display="";
	}
}
function CheckForm()
{ 
	if (!strlen(gEv('object')) || !strlen(gEv('region')) || !strlen(gEv('district')) || !strlen(gEv('address')) || !strlen(gEv('price')) || !strlen(gEv('name')) ||
	!strlen(gEv('phone')) || !strlen(gEv('price')) || !strlen(gEv('email')))
	{
		alert("Пожалуйста, заполните все поля.");
		return false;
	}
}

