I've got a piece of javascript that chooses 3 images randomly from an image folder and slots them in my html page.

What I would like it to do though is to make it retrieve/get file names from a directory and put these into the javascript array without me having to write the names of the images in the script (or the number of them) which I'm not sure can be done.

can anyone help???