function getDocumentSize() {
    return {"height":document.body.offsetHeight, "width":document.body.offsetWidth};
}

function ShowHide(id) {
  if ($('#section'+id).is(":hidden")) {
     $('.ns-hidden').hide('slow');
     $('#section'+id).show('normal');
  } else {
     $('#section'+id).hide('normal');
  }
}
 
function SetFormField(text) {
  for (i = 0; i < 10; i++ ) {
    if (($('#PROPERTY_152_'+i).val() == "") && ($('#PROPERTY_152_'+i).val() != text)) {
       $('#PROPERTY_152_'+i).val(text); 
       break;
    }
  }
}




function do_show () {
	
	dimensions=getDocumentSize();
	width=dimensions.width;
	
	
	switchObj1=document.getElementById("okno2");
	switchObj2=document.getElementById("okno3");
	switchObj3=document.getElementById("switch_block_3");
	switchObj4=document.getElementById("switch_block_2");
	switchObj5=document.getElementById("switch_block_1");
	switchObj6=document.getElementById("switch_block_0");
	
	
	if (1300>width) {
		
		switchObj1.style.display="block";
		switchObj2.style.display="none";
		switchObj3.style.display="none";
		switchObj4.style.display="none";
		switchObj5.style.display="none";
		switchObj6.style.display="none";

	}
	
	if (1490>width && width>1302) {
		
		switchObj1.style.display="block";
		switchObj2.style.display="none";
		switchObj3.style.display="none";
		switchObj4.style.display="none";
		switchObj5.style.display="block";
		switchObj6.style.display="none";
		

	}

	if (1850>width && width>1500) {
		
		switchObj1.style.display="block";
		switchObj1.style.display="none";
		switchObj3.style.display="block";
		switchObj4.style.display="none";
		switchObj5.style.display="block";
		switchObj6.style.display="none";
	}

		if (width>1850) {
		
		switchObj1.style.display="block";
		switchObj2.style.display="block";
		switchObj3.style.display="block";
		switchObj4.style.display="none";
		switchObj5.style.display="block";
		switchObj6.style.display="block";

	}
	


    if (dy !=0)
    {
      var obj=document.getElementById('scrollable');
      obj.scrollTop=obj.scrollTop+dy;
    }
    setTimeout('ScrollIndex()',10);
	
	
}	
	
	
	
  var dy=0;
  function ChangeScrollTop(off)
  {
    dy=off;
    return false;
  }
 
  function ScrollIndex()
  {
    if (dy !=0)
    {
      var obj=document.getElementById('scrollable');
      obj.scrollTop=obj.scrollTop+dy;
    }
    setTimeout('ScrollIndex()',10);
  }	
	
	
	


