function CallbackForSheetButton(nCount)
  flags.is_hidden_loc = false;
  jump("ugol","kamera",18,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 idObject==obj.izole.id then selectrandomobjectus(1.5,obj.izoel.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 < 1000000104 then --кликаем на активный объект
    playeffect("collaps")
      dropped_obj = dropped_obj + 1;
      CollapseObj(obj_id);
      if obj_id==obj.izoel.id then
        RemoveActivObject(obj.izole.id)
        obj.izole.is_removed=true
      end
    return; end
  return ;end;
 
  if sender == 12 then
        if obj.kopyto.is_collapsed and obj.prishe.is_collapsed and obj.starko.is_collapsed and
        obj.vinogr.is_collapsed and obj.keros.is_collapsed and obj.chajk.is_collapsed and
        obj.syrok.is_collapsed and obj.kol.is_collapsed and obj.kopaj.is_collapsed and
        obj.anakon.is_collapsed and obj.ramon.is_collapsed and obj.molka.is_collapsed and    
        obj.svitru.is_collapsed and obj.palych.is_collapsed and obj.izoel.is_collapsed
        then
           Block_Show_Cur(true);
            if not hidden_finished then
                StartTimer(8881,1);
            end;
            hidden_finished=true  
           
        end;
  return; end;
  
  if sender==36 then
    if obj_id == 8881 then
      Block_Show_Cur(false);
      playeffect("hidenend")
      StoreObj(obj.izole.id,nil,"412",335,350,"izo",316,226)
    return; end;
  return; end;
  -- if sender==6 and hidden_finished then
    -- WaitRender();
  -- return;end;
  if sender == 50 then
    WaitRender();
  return; end;
  if sender == 100 then 
  BlockCursor(false)
  if hidden_finished then
    flags.is_hidden_finish=true
    flags.hidden_ugol = true;    
    flags.is_hidden_loc = false;
    neighbors.ugol.lock=true;      
    jump("ugol","kamera",18,0);
    SetDrawSheet("re",false);
    StopEmiter("ugol");
    dropped_obj = 0;
  return; end;
  return; end;
end
function SheetSwitched(nCount)
end;