I am pretty new to Javascript...

I have a folder full of images and I want thumbnails arranged tiled on my site so visitors can click to see the larger image. How do I dynamically create thumbnail links from the contents of the folder instead of manually creating each link? I want to be able to simple add or remove files from the folder and nothing more. Thanks!