XML Photo gallery Help--how to add categories?

I did the XML Photo Gallery tutorial, and I’m wondering how to make buttons that load categories of images. I would love to load only the new set of thumbnails and keep the picture on the screen???

Any help would be much appreciated…