item retrieval code bricks for JavaScript