lifeworks 5 Junior Poster

Hi

Im trying to re-make one of those image galleries where you click the thumbnail and the whole browser window is blacked out with the larger image displayed in the middle. Ive gotten as far as finding a script to hide this black layer and reveal it onMouseClick... but if Im using a database of images, I cant hard code every hidden layer for each gallery... and I dont think loading up every single large image in the background is fair to the viewer...

how can I set the path of the large image when the user clicks the thumbnail and then still reveal the black layer?