i have a directory with 50-60 .jpg images that change every week or so. i use 10 of those images in an album that changes weekly. the filenames are always changing.

using javascript, is there anyway i can populate an array with the filenames and then randomly select ten of them to display in my album?

i know i can do this if the filenames are the same and don't change, but is it possible to do it with ever-changing filenames? or would i have to resort to a database solution?