Actionscript—photo gallery tweaking

hi everyone! i designed a photo gallery for a photographer’s website, using the tutorial found here: http://www.kirupa.com/developer/mx/photogallery.htm. (you can view the actual site at www.jennifersanderson.com/gallery.html) everything works perfectly and the client loves it, but the only problem is this—if the vertical pictures are centered, then the horizontal ones are off-center, and vice versa. i’m sure there’s some actionscript that can fix this, maybe a conditional statement or something? something along the lines of

if (photo_mc._width > 300){
photo_mc._x = -200;
}
else{
photo_mc._x = 0;

although this code didn’t actually work, i think it would be something like this. can anyone help me? thank you so much in advance, i really appreciate it.

morgan