Kirupa Photo Gallery Help!

i need just a little bit more help to finish up the last of my flash project. The Kirupa.com photo gallery tutorial did wonders and i have it all setup but unlike the pics in the tutorial my pics arn’t all the same size. Could somebody please tell me what i could add to the code to have it autofit the picture window? And last thing is there a way to make it so you can click on my pics and have it open a new page with the full sized pic kinda like a thubnail would?