I want to open image gallery in a popup window. I have added 4 images with different ids. How do I retrieve the id of each image dynamically in Javascript so that the image in t