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

function gameinput (sender,obj_id,attachedID)    
Buttons_T(sender,obj_id) 
CursorTreatment(obj_id,sender,attachedID); 
  if sender == 30 then
    DeleteResource("fakel1");
    DeleteResource("fakel3");     
    DeleteResource("fakel4");      
    setcurentleaf("secret_room",7,0);
    if flags.fakel then
      ActivateObject(14,false);
      Set_Anim_Cur(14,3);
      StopEmiter("na_fakel");
      flags.help_fakel = true;
    end;
    Block_Show_Cur(false);
  return;end;
  
  if sender==50 then
        Block_Show_Cur(true);
        StartTimer(8882,1);
  return;end;
  
  if sender == 1 then

    if obj_id == 6 or obj_id == 4 then
      if obj.svech ~= nil and attachedID == obj.svech.id then
        RemObjFromMouse()
        UnStoreObj(attachedID);
        flags.fakel = true;  
        StoreObj(obj.svgor.id,nil,"3034",285,350,"svecha_gorit",323,217)    
      return; end;
      if attachedID~=-1 and ((obj.svech~=nil and attachedID ~= obj.svech.id) or (obj.svech==nil ))  then
        RemObjFromMouse()
        CreatePlashechka(900000,"1000")
      return;end;        
        CreatePlashechka(900000,"156")      
    return; end;
    
  return ;end;

  if sender == 36 then

    if obj_id == 8882 then
      Block_Show_Cur(false);
       
      clear_satelite_leaf("secret_room");
    return; end;

  return; end;

  
end
function SheetSwitched(nCount)
end;