Complex xml loading using photoGallery tutorial

I am currently building a portfolio site and was able to incorporate the kirupa thumbnail gallery in tandem with an externally loaded scrolling XML menu. When you click on an item in the menu, it changes the XML file that is being loaded by the photogallery. Thus the thumbnails and the current image change based on the newly loaded XML doc.

My problem is that the thumbnail images are not completely refreshed. If there are 20 images in XMLdoc1, and 15 images in XMLdoc2, then when I click on XMLdoc2, the first 15 thumbnails change, but the remaining 5 thumbnails from XMLdoc1 stay where they are.

I assume that what is happening is that, because the thumbnails are being placed in new movie clips using getNextHighestDepth, the thumbnails from the newly loaded XML doc simply populate the existing new movies without first refreshing the container mc.

Is there any way to simply add a function that would reset or delete the new movie clips in response to clicking on an externally loaded menu (in another swf) whose current action is simply to call a new XMLdoc?
After that, it would have to regenerate the movie clips based on the new XMLdoc.

My swf tree looks like this:

master.swf //calls everything into itself (as the name implies)

workphoto.swf //the thumbnail gallery is located here (called into level5 of master.swf

listMenu.swf //an XML driven menu with different clients. each item uses an action to call a new XMLdoc into the thumbnail gallery
Actions.newMenu = function(menuxml){
_level5.xmlData.load(menuxml);
};

scrollMenu.swf //listMenu.swf is first called into this swf before being loaded into the master.swf (this is so that the list will scroll)

mainMenu.swf //the mainMenu that is called from the start

to see a sample of what is going on:
http://www.completepicture.com/flash
click on “work” then, using the menu at the bottom, select nicaragua gallery, then select dark city again. You will see that the last few images from nicaragua are appended onto dark city, as dark city has fewer images.

thanks for the help
craig