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

function gameinput (sender,obj_id,attachedID)    
Buttons_T(sender,obj_id)
CursorTreatment(obj_id,sender,attachedID); 
  if sender == 30 then
      DeleteResource("vepr2");
      DeleteResource("vepr3");
      DeleteResource("vepr4");
    setcurentleaf("mayor_house",8,0);
    Block_Show_Cur(false);
    if flags.vepr then
      speciale_action(2,14);
      ActivateObject(15,false);
      Set_Anim_Cur(15,3);
      StopEmiter("vepr");
      if flags.volf then
        open_tiger=true
        Block_Show_Cur(true)
        StartTimer(5678,0.5)
      end;
    end;

  return;end;
  
  if sender == 1 then
    if obj_id == 5 then
      if obj.biven ~= nil and attachedID == obj.biven.id then
        RemObjFromMouse()
        UnStoreObj(attachedID);
        playeffect("klyk") 
        Block_Show_Cur(true);
        flags.vepr = true;
        speciale_action(2,4,true);
      return; end;
      if attachedID~=-1 and ((obj.biven~=nil and attachedID ~= obj.biven.id) or (obj.biven==nil ))  then
        RemObjFromMouse() 
        CreatePlashechka(900000,"1000")
      return;end;     
        CreatePlashechka(900000,"243")      
    return; end;
  return ;end;
  
  if sender == 16 then
    if obj_id == 4 then
      StartTimer(8882,0.8);
    return; end;
  return; end;

  
  if sender == 36 then
    if obj_id == 8882 then    
      Block_Show_Cur(false);
            
      clear_satelite_leaf("mayor_house");
    return; end;    
  return; end;

end
function SheetSwitched(nCount)
end;