function changeObjectType(obj)
{
 if(obj.checked)
  {
	if(obj.value==1)
		obj.form.setAttribute("action","/objects/outer/");

	if(obj.value==2)
		obj.form.setAttribute("action","/objects/inner/");
		
  }
}
//--------------------------------------------------
function colorBlock(obj)
{
 var img = obj.getAttribute("id") + "_s.jpg";
 obj.style.backgroundImage = 'url("/images/' + img + '")';
}
//-------------------------------------------
function unColorBlock(obj)
{
 var img = obj.getAttribute("id") + ".jpg";
 obj.style.backgroundImage = 'url("/images/' + img + '")';
}
//--------------------------------------------------------
function changeOffice(nf)
{
   var TID = CPHttpRequest.InitThread(); 
   CPHttpRequest.SetAction(TID, showResult); 
   CPHttpRequest.Send(TID, '/office.php', {'mode':'ajax', 'new_office':nf}); 
}
//-----------------------------------------------------
function showResult(result)
{
	document.getElementById('offices').innerHTML = result;
}
