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("kamin_pepel"); 
    DeleteResource("kamin_pepel7");  
    Block_Show_Cur(false);
    if flags.kamin then
        setcurentleaf1("mayor_house",8,0);    
        fromkamin=true        
        WaitRender()
    return;end;
    setcurentleaf("mayor_house",8,0);    
  return;end;
  
  if sender == 1 then

    if obj_id == 5 then
      if obj.sovok ~= nil and attachedID == obj.sovok.id then
        RemObjFromMouse()
        speciale_action(2,3,true);
        Block_Show_Cur(true);
        playeffect("sovok")
        ActivateObject(5,false);
        Set_Anim_Cur(5,3);
      return; end;
      if attachedID~=-1 and ((obj.sovok~=nil and attachedID ~= obj.sovok.id) or (obj.sovok==nil ))  then
        RemObjFromMouse() 
        CreatePlashechka(900000,"1000")
      return;end;
        CreatePlashechka(900000,"197")      
    return; end;

  return; end;
  if sender == 16 then
    if obj_id == 3 then
      speciale_action(2,3,true);
      speciale_action(2,5,true);
      Set_Anim_Cur(6,4);  
      flags.kamin = true;
      StartTimer(8882,1);
      Block_Show_Cur(true);
      AddGlobalFade(7777777,0)
      SetAlfa(7777777,0,1,0.5)      
    return; end;
  return; end;
  
  
  if sender == 36 then

    if obj_id == 8882 then
      Block_Show_Cur(false);
      UnStoreObj(obj.sovok.id);
      clear_satelite_leaf("mayor_house");
    return; end;

  return; end;

  
end
function SheetSwitched(nCount)
end;