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("volf2");
      DeleteResource("volf3");
      DeleteResource("volf4");     
    setcurentleaf("mayor_house",8,0);
    Block_Show_Cur(false);
    
    if flags.volf then
      speciale_action(2,18);
      ActivateObject(19,false);
      Set_Anim_Cur(19,3);
      StopEmiter("volf");
      if flags.vepr then
        Block_Show_Cur(true)
        open_tiger=true
        StartTimer(5678,0.5)
      end;
    return;end;

  return;end;
  

  
  if sender == 1 then

    if obj_id == 5 then
      if obj.klyk ~= nil and attachedID == obj.klyk.id then
        RemObjFromMouse()
        UnStoreObj(attachedID);
        playeffect("klyk") 
        Block_Show_Cur(true);
        flags.volf = true;
        speciale_action(2,4,true);
      return; end;
      if attachedID~=-1 and ((obj.klyk~=nil and attachedID ~= obj.klyk.id) or (obj.klyk==nil ))  then
        RemObjFromMouse()
        CreatePlashechka(900000,"1000")
      return;end;          
      CreatePlashechka(900000,"242")
    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;