Change XML Path? JavaScript?

Can some please help me?

(file type = .xsl)

I need some kind of javascript (or something that will work with this) that can switch from “//pic[@category]” to either:"//pic[@category=‘kitchen’]", “//pic[@category=‘bath’]”, “//pic[@category=‘home’]”. That is either done from a basic text link or a select form (I’ve tried both). This script will replace the following line (towards middle bottom of the .xsl):
<xsl:for-each select="//pic[@category]">


I tried doing a variation of a javascript:

<script language=“JavaScript”>
function movepic(img_name,img_src) {
document[img_name].src=img_src;
}
</script>

That uses:
<a href="#" onClick=“movepic(‘pix1’,‘image.jpg’)”>LINK</a>


But it doesn’t work because <xsl:for-each select="//pic[@category]"> cannot have a name.
(I didn’t put the variation js because it didn’t work.)

Any ideas?

Here’s my .xsl:


<?xml version=“1.0” encoding=“ISO-8859-1”?><xsl:stylesheet version=“1.0”
xmlns:xsl=“http://www.w3.org/1999/XSL/Transform”><xsl:template match="/">
<html>
<body>
<a name=“top”></a>
<div>
All Thumbnails:<br />
<xsl:for-each select="//pic[@category]">
<xsl:variable name=“thumbs” select=“thumbnail”/>
<xsl:variable name=“links” select=“link”/>
<xsl:variable name=“titlename” select=“description”/>
<a href="#{$links}"><img src="{$thumbs}" class=“thumbss” title="{$titlename}"/></a>
</xsl:for-each>
</div>
<center>
<div id=“greyba”>
<table border=“0” cellspacing=“0” class=“maincontent”>
<xsl:for-each select="//pic[@category]">
<tr>
<td>
<xsl:variable name=“anchors” select=“link”/>
<a name="{$anchors}"></a>
<xsl:variable name=“srcl” select=“leftpic”/><xsl:variable name=“srcr” select=“rightpic”/>
<img src="{$srcr}" /></td>
<td class=“right” ><img src="{$srcl}" /><br />
<xsl:value-of select=“description”/>
</td></tr>
<tr>
<td class=“botle”>[<a href="#top">back to top</a>]</td>
<td></td>
</tr>
</xsl:for-each>
</table>
</div>
</center>
</body>
</html>
</xsl:template></xsl:stylesheet>


I hope you can help

Thank you,
Kevin