function CallbackForSheetButton(nCount)
  flags.is_hidden_loc = false;
  jump("rubka","parom_main",10,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.biven.id then selectrandomobjectus(1.5,obj.bivne.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.bivne.id then
        RemoveActivObject(obj.biven.id)
        obj.biven.is_removed=true
      end
      
    return; end
  return ;end;
  

  if sender == 12 then
     --  if not flags.hidden then
        if obj.veslo.is_collapsed and obj.lotos.is_collapsed and obj.bots.is_collapsed and
        obj.grufa.is_collapsed and obj.shetk.is_collapsed and obj.bivne.is_collapsed and
        obj.drel.is_collapsed and obj.trosl.is_collapsed and obj.furik.is_collapsed and
        obj.komps.is_collapsed and obj.remen.is_collapsed and obj.plstkn.is_collapsed and    
        obj.boobl.is_collapsed and obj.sturv.is_collapsed and obj.binol.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==36 then
    if obj_id == 8881 then
      Block_Show_Cur(false);
      playeffect("hidenend")
      -- CreatePlashechka(900000,"227")
      StoreObj(obj.biven.id,nil,"227",335,350,"biven",210,229)

    return; end;
  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_rubka = true;    
    flags.is_hidden_loc = false;
    neighbors.parom_main.lock = true;
    jump("rubka","parom_main",10,0);
    StopEmiter("rubka");
    SetDrawSheet("re",false);


    dropped_obj = 0;
  return; end;
  return; end;
end
function SheetSwitched(nCount)
end;