I have done something similar to what you want to do. I did mine in php.
OK so we have a structure kinda like this:
OK so the explanation goes a bit like this... The root dir html has a directory in it called galleries (amongst others not listed)
In the galleries directory there are several subdirectories for each simpleviewer gallery that I want, there are also some files, but I will get to those in a minute. Each Simpleviewer Gallery directory has an images and a thumbs subdirectory and it also has an index.php and a gallery.xml.
Because I'm using php you can do nice simple file includes and if you are paying attention you can do the file includes from anywhere in your web structure.
I am essentially a fairly lazy person and avoid work where I can. :) I wanted to ba able to edit things in one place as much as I possibly can so I use file includes all over my websites for things like footers and headers and stuff, but I digress. In each simple viewer gallery index.php I call the viewer-code.php which references the js and the flash objects. Works very nicely. I have done the same thing on two websites already and there will be many more I am sure.
check it out at http://www.airbrushworld.com.au and http://www.badattituderacing.com.au/galleries.php.
If I haven't made sense then let me know.