function Buttons_T(sender,obj_id)
ButtonTreatment(obj_id,10001,10002,10003,CloseBtnX,CloseBtnY,34,34,sender,"prichal_turmy",false)   
end;

function gameinput (sender,obj_id,attachedID)    
CursorTreatment(obj_id,sender,attachedID); 
Buttons_T(sender,obj_id)    
  if sender == 30 then
      DeleteResource("rama_2");
      DeleteResource("rama_4");     
      DeleteResource("rama_5");       
      DeleteResource("turb");  
    setcurentleaf("prichal_turmy",12,0);    
    Block_Show_Cur(false);
    if flags.rama_steklo then
      Set_Anim_Cur(4,3)
      ActivateObject(4,false)
      speciale_action(2,6);
      StopEmiter("rama");
    end;
  return;end;
  
  if sender==50 then
        Block_Show_Cur(true);
        StartTimer(8882,1.5);
  return;end;
  
  if sender == 1 then
    if obj_id == obj.bolgra.id then
      if obj.rabper ~= nil and attachedID == obj.rabper.id then
        RemObjFromMouse()
        UnStoreObj(attachedID);
        flags.rama_steklo = true;  
        StoreObj(obj.bolgar.id,obj_id,"451",285,350,"turb",323,217)
      return; end;
      if attachedID~=-1 and ((obj.rabper~=nil and attachedID ~= obj.rabper.id) or (obj.rabper==nil ))  then
        RemObjFromMouse() 
        CreatePlashechka(900000,"1000")
      return;end;    
    CreatePlashechka(900000,"452")      
    return; end;
  return ;end;
  

  if sender == 36 then
    if obj_id == 8882 then
      
      clear_satelite_leaf("prichal_turmy");
    return; end;
  return; end;


end
function SheetSwitched(nCount)
end;