function display_block(id)
{
	ret=false;
	with (document)
	{
		if(id!="")
		{
		obj=getElementById(id);
		if (obj.style.display=='')obj.style.display='none';
		else if (obj.style.display=='none')obj.style.display='';
		ret=true;
		}
	}
	return ret;
}
function change_element_class(id,class1,class2)
{
	ret=false;
	with (document)
	{
		if(id!="")
		{
		obj=getElementById(id);
		if (obj.getAttribute('class')==class1)obj.setAttribute('class',class2);
		else if (obj.getAttribute('class')==class2)obj.setAttribute('class',class1);
		ret=true;
		}
	} 
	return ret;
}
function SetCookie (name,value,expires,path) {
  	for (var i in name)
	{
		  document.cookie = name[i] + "=" + escape (value[i]) +
		  ((expires) ? "; expires=" + expires : "Never") +
		  ((path) ? "; path=" + path : "");
	}
}
function image_rename(id,path,nn)
{
	img=document.getElementById(id);
	img.src=path+nn;
}
function validate_delete()
{
	if (confirm('Вы уверены?! Удаление необратимо!!!'))return true;
	else return false;
}

function review(id,id2)
{
	with (document)
	{
		rev=getElementById(id);
		but=getElementById(id2);
		if(rev)
		{
			if (rev.style.display=="")
			{
				rev.style.display="none";
				if(but)but.value="+";
			}
			else
			{ 
				rev.style.display="";
				if(but)but.value="-";
			}
		}
	}
}
