function mini_create ()
  show_help_wnd=true;
  init_mini(1);
  create_mini(19,49,30,315,160,1000,800,596,2,10,0,-1);
end;
function gameinput (sender,id,attachedID)

  if sender==30 then
    if flags.minicomplete35 then
      setcurentleaf("oranjereya",1,2);
      flags.posvetlelo=true
      AddParticleToObject(54,"pu4ok2",835,551);
      MoveEmiter("pu4ok2",835,551);
      if not flags.minicomplete15 then 
        StartEmiter("pu4ok2"); 
      end;
      set_visible_object(5,false)
      Set_Cursor(105,4)
      Set_Cursor(54,2);
      playeffect("29"); 
      flags.dver= true;      
      setcurentleaf("barton_vhod",1,0); 
      CreateWindow(150,250,"215",nil,nil,250,30);
      --playeffect("01");
      StopEmiter("Svet14"); 
      Set_Cursor(45,3)
      savegame(SaveLevel());
    end;
    setcurentleaf("barton_vhod",1,0);
    flags.nohints=false;
  return; end;
    if sender==26 then
    if id==100 then
    set_visible_object(5001,true)
    end;
  return; end;
  if sender==10 then
    flags.rub= true;
    CreateWindow(150,250,"216",nil,nil,250,30); 
          --playeffect("01");
    speciale_action(2,657);
  return; end;
  if sender==37 then
     skipping=true;
  return;end;    
  if sender==36 and id==2100 then
    clear_satelite_leaf("barton_vhod");
  return;end;  
  if sender==100 then
    if not help then
      CreateWindow(200,200,"7",100,"messageinfo",30,50)
       playeffect("11");  
      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==1 then
    if id==6000 then
          helpbtn=true;
    return;end
    if id==5000 then
      if skipping then
        if not flags.minicomplete35 then
          finish_mini_game(true);
        return;end;  
      return;end;
    return;end;
    if id==645 then
      playeffect("17");  
      finish_mini_game(false);
      clear_satelite_leaf("barton_vhod");
      DeleteResource("m35_close"           );
      DeleteResource("m35_fon"             );
      DeleteResource("m35_ramka"              );
      DeleteResource("m35_lenta"             );
      DeleteResource("m35_fonaroff"         );
      DeleteResource("m35_fonaron"             );
      DeleteResource("m35_orangoff"           );
      DeleteResource("m35_orangon"           );
      DeleteResource("m35_zaloff"             );
      DeleteResource("m35_zalon"             );
      DeleteResource("m35_zvon"           );
      DeleteResource("m35_puskoff"         );
      DeleteResource("m35_puskon"         );
      DeleteResource("m35_rama"          );
      DeleteResource("m35_tumboff"       );
      DeleteResource("m35_tumbon"         );
      DeleteResource("m35_vikly4atel"     );
      DeleteResource("m35_provod"        );
      DeleteResource("m35_lock"        );
      DeleteResource("m35_zvonoff"        );  
    return;end;  
  if id==659 then
  playeffect("18");  
  if not flags.rub then
    flags.no=true
    speciale_action(2,659);
  return;end;
  if flags.rub then
    speciale_action(2,659);
    speciale_action(2,653,true);
    flags.minicomplete35=true;
    StartTimer(2100,2.5)
  return;end;
  return;end;
    check_mini_game_puzzle(id,7);
playeffect("23");    
  return; end;  
    if sender==6  then
          if helpbtn then
       CreateWindow(200,200,"7",100,"messageinfo",30,50)
         playeffect("11");    
      helpbtn=false;
    end;
      if flags.no then
      speciale_action(2,659);
      flags.no= false;
      return;end;
    return;end;
end;