function mini_create()
  init_mini(true)
  create_mini(8128);
end
function switchmini(param1)
  playeffect("knopki")
  speciale_action(2,param1)
  if not lights[param1] then
    lights[param1]=true
  else 
    lights[param1]=false 
  end;
end;
function miniTurn(param1,param2,param3)
  if param1 then switchmini(param1) end;
  if param2 then switchmini(param2) end;
  if param3 then switchmini(param3) end;
  CheckMini()
end;
function CheckMini()
  error_game=false
  for i=1,7,1 do
    if not lights[i] then
      error_game=true
    end;
  end;
  if not error_game then
    finish_mini_game(true)
  end;
end;

function gameinput (sender,obj_id,attachedID)
  MiniInterfaceHandler(sender, obj_id);
  sendersProcessing(sender, obj_id, attachedID);
  if sender==30 then
    if flags.HawkOK then
    
      speciale_action(2,2)
      speciale_action(10,2)
      setCursor(obj.mini_VhodKBratamGerb_19_0.id,5);
      StopEmiter("Standart_19_3");
    end;
  return;end;
  
  if sender==10 then
    flags.HawkOK=true
    for i=1,7,1 do
      set_visible_object(i,true)
    end;
    playeffect("mini_complete")
    StartTimer(timerID,2,"CloseSatelite")
    StartTimer(453,1)
  end;
  
  if sender==16 then
    if obj_id==obj.hawk_in_19_11.id then
      speciale_action(2,obj.hawk_in_19_11.id,true,1.5) 
      speciale_action(2,obj.hawk_ok_19_11.id,true,1.5) 
    end;
    if obj_id==obj.hawk_ok_19_11.id then
      speciale_action(2,obj.hawk_ok_19_11.id,true,1.5) 
      speciale_action(2,obj.HawkOpen_19_11.id,true,1.5) 
    end;
    if obj_id==obj.HawkOpen_19_11.id then
      Block_Show_Cur(false)
      flags.Hawk_in=true
      miniCreate()
      for i=8,14,1 do  
        setCursor(i,4)
      end;
    end;    
  return;end;
  
  if sender==1 then
  if not flags.Hawk_in  then
    if obj_id==15 then    
      if obj.hawk_coin_20_11~=nil and attachedID==obj.hawk_coin_20_11.id then
        removeFromMouse()
        UnStoreObj(obj.hawk_coin_20_11.id)    
        Block_Show_Cur(true)
        playeffect("gol_ins")
        setCursor(15,3)
        speciale_action(2,15)
        speciale_action(2,obj.hawk_in_19_11.id,true,1.5) 
      return;end;
      if (obj.hawk_coin_20_11==nil or (obj.hawk_coin_20_11~=nil and attachedID~=obj.hawk_coin_20_11.id) )and attachedID~=-1 then
    CreatePlashechka("10000")
    return;end;  
    if   attachedID==-1 then
    CreatePlashechka("20002")
    return;end;      

    end;
  return;end;  
    if  flags.Hawk_in and not flags.HawkOK then
      if obj_id==8 then
        miniTurn(1,4)      
      return;end;
      if obj_id==9 then
        miniTurn(2,6)
      return;end;
      if obj_id==10 then
        miniTurn(3,5)
      return;end;
      if obj_id==11 then
        miniTurn(1,4,7)
      return;end;
      if obj_id==12 then
        miniTurn(5,3)
      return;end;
      if obj_id==13 then
        miniTurn(2,6)
      return;end;
      if obj_id==14 then
        miniTurn(7,4)
      return;end;  
    return;end;      
  end
end

function SheetSwitched(nCount)
end;
