Automatically centering loaded images w/ xml gallery

I was wondering if it was possible to convert this photo gallery into one that can center the images that are loaded via xml. I know I can make all of my images universal in size like the tutroial, but what if you are working with various sized images?

(from the following tutorial)

http://www.kirupa.com/developer/mx2004/thumbnails.htm

Any help on this would be much appreciated!
Thank you to all of you who participate and help out by the way! I’ve learned so much from this site and the supporters!

:tb: