how to access all images in a document javascript