XML & XSL in PHP

This image is suppose to show what I’m trying to do. I have been trying to figure this our for way to long now… Maybe this image might help get the idea across…

file.xml:

<images>
<portrait type=“blue” image=“images/blue1.jpg” thumb=“/images/thumbs/blue1.jpg” description=“This is blue " />
<portrait type=“blue” image=“images/blue2.jpg” thumb=”/images/thumbs/blue2.jpg" description=“This is also blue! " />
<portrait type=“yellow” image=“images/yellow1.jpg” thumb=”/images/thumbs/yellow1.jpg" description=“This is yellow” />
<portrait type=“pink” image=“images/pink1.jpg” thumb=“/images/thumbs/pink1.jpg” description=“This is a pink color” />
<portrait type=“pink” image=“images/pink2.jpg” thumb=“/images/thumbs/pink2.jpg” description=“This is also a pink color” />
</images>

The “default” when the page is loaded should load “/images/portrait[@type]” (to view “Show All” thumbnails.
When Menu is click on “Yellow” the selected should load the thumbnails of “/images/portrait[@type=‘yellow’]…“Blue” /images/portrait[@type=‘blue’] …and so on…
When thumbnails are clicked loads data. Example: If yellow thumbnail (thumb=”/images/thumbs/yellow1.jpg") is clicked opens “image” value (“images/yellow1.jpg”) on the right along with the “description” value (“This is yellow”).
I can get a lot of this to work in XSL when the XML loads the external XSL but then I cannot make a Javascript that will work for this function and I think that this would work a lot better in PHP (which my server supports).
I seriously need some real help I’m burnt out on this, it’s driving me insane. I know someone out there has to know how to do this.

(It’s suppose to be “Show All” not “Show Al” in the image…whoops)