Photo Gallery Tutorial

In reference to this tutorial:
http://www.kirupa.com/developer/mx/photogallery.htm

I was wondering how to load portrait pictures as well as landscape. I can resize pictures so that they fit in the window, but all portrait pictures end up on the left side of the movie. Is there a way that I can simply center portrait pictures?

Thanks!
Brett