There is a slideshow on my website that reads in the address of local images and puts them in a slideshow rotation to be displayed on the page. I currently have to "hard code" the addresses in, similar to the JavaScript below:

path[0] = "file://///Images/slide_image1.jpg";
path[1] = "file://///Images/slide_image2.jpg";
path[2] = "file://///Images/slide_image3.jpg";

However, I want to be able to place images in the Images directory without having to make sure the files are named the same as in the code. I would like JavaScript to go out to a local directory, see what's in there, grab anything in jpeg format (regardless of the name), and put it in the slideshow rotation. Would anyone have any guidance on how to do this? Thanks!