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

function gameinput (sender,obj_id,attachedID)    

Buttons_T(sender,obj_id)
CursorTreatment(obj_id,sender,attachedID);    
  if sender == 30 then
      DeleteResource("luc_parom2");
      DeleteResource("luc_parom");    
      DeleteResource("luc_parom8");   
    if hint then
      flags.GlobalHint = false;
    end;
    setcurentleaf("parom_main",10,0);
    Block_Show_Cur(false);
    if flags.luk_parom then    
        fromopenluk=true;
        WaitRender()
    return;end;
    DarkScreen(false);    
  return;end;
  
  if sender == 1 then

    if obj_id == 8 then
      if obj.fomka ~= nil and attachedID == obj.fomka.id then
        RemObjFromMouse()
        UnStoreObj(obj.fomka.id);
        Block_Show_Cur(true);
        speciale_action(2,7,true);
        Set_Anim_Cur(7,4);
        flags.luk_parom = true;
        ActivateObject(8,false);
      return; end;
      if attachedID~=-1 and ((obj.fomka~=nil and attachedID ~= obj.fomka.id) or (obj.fomka==nil ))  then
        RemObjFromMouse()
        CreatePlashechka(900000,"1000")
      return;end;    
        CreatePlashechka(900000,"314")      
    return; end;

  return ;end;
  
  if sender == 16 then
    if obj_id == 7 then
      playeffect("luk")
      speciale_action(2,5,true);
      speciale_action(2,6,true);
      speciale_action(2,7,true);
      speciale_action(2,8,true);
    return; end;
    if obj_id == 6 then
      speciale_action(2,4,true);
      speciale_action(2,6,true);
      speciale_action(2,5,true);
    return; end;
    if obj_id == 4 then        
      StartTimer(8882,1);
    return; end;
  return; end;
  
  
  if sender == 36 then
    if obj_id == 8882 then
      Block_Show_Cur(false);
       
      clear_satelite_leaf("parom_main");
    return; end;
    if obj_id == 444 then
      hint = true;
    return; end;
  return; end;
  
end
function SheetSwitched(nCount)
end;