function CallbackForSheetButton(nCount)
  flags.is_hidden_loc = false;
  jump("stol_police","police",4,0);        
end;

function LevelComplete()
	if not flags.blockrender then
      Block_Show_Cur(true);
      StartTimer(8881,1);
      hidden_finished=true 
	  end;
return; end;

function SelectRandom()
  idObject=GetRandomObject();
  c=GetActivCount();
  if idObject==-1 then
      if c~=0 then SelectRandom() return;
      else
      return;end;
  end;  
  if obj.lodifp~=nil and idObject==obj.lodifp.id then selectrandomobjectus(1.5,obj.idlfr.id); return;end;
  if obj.photo~=nil and idObject==obj.photo.id then selectrandomobjectus(1.5,obj.kisl.id); return;end;      
  selectrandomobjectus(1.5,idObject);
return;end;

function ActionsJump ()
    
end;

function gameinput (sender,obj_id,attachedID)
  if sender == 1 then            
    if obj_id > 0 and obj_id < 10000000009 then
      playeffect("collaps")
      dropped_obj = dropped_obj + 1;
      CollapseObj(obj_id);
      if obj.idlfr~=nil and  obj_id==obj.idlfr.id then
        RemoveActivObject(obj.lodifp.id)
        obj.lodifp.is_removed=true
      end
      if obj.kisl~=nil and  obj_id==obj.kisl.id then
        RemoveActivObject(obj.photo.id)
        obj.photo.is_removed=true
      end          
    return; end;
  return ;end;
  
  -- if sender == 4 then
    -- Block_Show_Cur(true);
    -- StartTimer(1,1,5);
  -- return; end;
  
  if sender == 12 then
    if flags.hidden3 then
        if obj.turba.is_collapsed and obj.nenau.is_collapsed and obj.monik.is_collapsed and
        obj.hodilk.is_collapsed and obj.opitku.is_collapsed and obj.slast.is_collapsed and
        obj.kirpik.is_collapsed and obj.laima.is_collapsed and obj.telof.is_collapsed and
        obj.idlfr.is_collapsed and obj.saher.is_collapsed and obj.dyrker.is_collapsed and    
        obj.pegout.is_collapsed and obj.pleva.is_collapsed and obj.mel.is_collapsed
        then
          Block_Show_Cur(true);
            if not hidden_finished then
                StartTimer(8881,1);
            end;
            hidden_finished=true  
    end;
    return; end;    
    if not flags.hidden3 then
        if obj.sigar.is_collapsed and obj.lupa.is_collapsed and obj.pero.is_collapsed and
        obj.shilo.is_collapsed and obj.kastet.is_collapsed and obj.zmeja.is_collapsed and
        obj.spich.is_collapsed and obj.pisru.is_collapsed and obj.rjumk.is_collapsed and
        obj.pizza.is_collapsed and obj.prjaz.is_collapsed and obj.plat.is_collapsed and    
        obj.mjach.is_collapsed and obj.flja.is_collapsed and obj.kisl.is_collapsed
        then
          Block_Show_Cur(true);
            if not hidden_finished then
                StartTimer(8881,1);
            end;
            hidden_finished=true  
    end;
    return; end;        

  return; end;
  
  if sender == 50 then
    WaitRender();
  return; end;
  
  if sender == 36 then
    if obj_id == 8881 then
    playeffect("hidenend")
      if not flags.hidden3 then
        Block_Show_Cur(false);
        if obj.photo~=nil then
            StoreObj(obj.photo.id,obj_id,"122",335,350,"foto",291,239,400000)
        end;
      return; end;
      if flags.hidden3 then
        Block_Show_Cur(false);
        if obj.lodifp~=nil then
            StoreObj(obj.lodifp.id,nil,"488",335,360,"idol1",317,221)
        end;
      return; end;
    return; end;

  return; end;
  
  if sender==100 then
  BlockCursor(false)
  if hidden_finished then
    flags.is_hidden_finish=true;
    if flags.hidden3 then
      flags.is_hidden_loc = false;

      jump("stol_police","police",4,0);
      SetDrawSheet("re",false);
      flags.hidden_stol_police_two = true;
      StopEmiter("stol_police");    

      dropped_obj = 0;
    return; end;
    if not flags.hidden3 then
      flags.help_stol_police = true;
      flags.is_hidden_loc = false;

      jump("stol_police","police",4,0);
        SetDrawSheet("re",false);

      dropped_obj = 0;      
      -- Set_Anim_Cur(36,3);
      -- ActivateObject(36,false);
      flags.hidden3 = true;
      StopEmiter("stol_police");    

    return; end;
    return; end;
  return; end;
end
function SheetSwitched(nCount)
end;