local fMiniStarted=false;
function mini_create ()
 show_help_wnd=true;
 init_mini(1);
  -- create_mini(8128);

end;
--function mini_msg_proc (id)
function gameinput (sender,id,attachedID)

 if sender==26 then
  if id==100 and not fMiniStarted then
      BlockCursor(true);
      create_mini(1000,18,8+1,2000,600,false,651);
    StartTimer(123456,1.5);
    set_visible_object(5001,true)
      fMiniStarted=true;-----------------------------------------------------------------------------------
  return;end;
 return;end;
 if sender==36 then
  if id == 123456 then
    BlockCursor(false);
  return; end;
  if id == 2100 then
clear_satelite_leaf("flower");
  return; end;
 return; end;
  if sender==30 then
  BlockCursor(false);
    setcurentleaf("flower",14,0);
      flags.nohints=false;
    if flags.minicomplete26 then
      CreateWindow(150,250,"206",nil,nil,250,30);
            --playeffect("01");
      DeleteElement("gr",121);
      speciale_action(2,57);
      Set_Cursor(33,3);
      AddParticleToObject(57,"Svet2",301,559);
      MoveEmiter("Svet2",301,559);
      Set_Cursor(57,2);
      if (not flags.minicomplete42) then
        StartEmiter("Svet2");
      end;
      StopEmiter("cvetok");
      playeffect("29");
      savegame(SaveLevel());
    return; end;
  return; end;

  if sender==10 then
    flags.minicomplete26=true;
     StartTimer(2100,1);
     BlockCursor(true);
  return; end;

  if sender==37 then
     skipping=true;
  return;end;  

  if sender==100 then
    if not help then
      CreateWindow(200,200,"1",100,"messageinfo",30,50)
      --playeffect("01");
      help=true;
    end;
  return;end;
    if pause_state then
    if sender==1 or sender==6 or sender==14 then
      pause_state=false;
      --set_visible_object(11111,false);
    end;  
  return;end;
  if sender==6 then
    if helpbtn then
      CreateWindow(200,200,"1",100,"messageinfo",30,50)
          playeffect("11");
      helpbtn=false;
    end;
return;end;
  if sender==1 then
    if id==6000 then
      helpbtn=true;        
    return;end
    if id==5000 and skipping then
      if not flags.minicomplete then
        finish_mini_game(true);
      return;end;  
    return;end;
    if id>= 651 and id<= 686 then
      check_mini_game_memory(id);
      playeffect("chpok");
    return; end;

    if id==645 then
        playeffect("17");  
      finish_mini_game(false);
      clear_satelite_leaf("flower");
      DeleteResource("m26_close"       );
      DeleteResource("m26_fon"         );
      DeleteResource("m26_lenta1"         );
    return;end;
  return;end;

end; 
function PairsCounter(nCount,Param1)
end;
-- function StartPause()
-- --set_visible_object(11111,true);
-- speciale_action(4,11111);
-- pause_state=true;
-- end;