I am trying to assign an ID for an object dynamically using a Javascript.

My function basically strips out characters i dont want and leaves the important data that i can then use as a unique ID for an object.

The problem is it never executes my script thus i presume the ID of the object doesnt get set. But why??

Here is my code:
Code:
<DIV ID="'stripBuild('@name')'" STYLE="display:none">
  <xsl:attribute name="ID">
    stripBuild('<xsl:value-of select="@name"/>')
  </xsl:attribute>
  <xsl:apply-templates select="./*"/>
</DIV>
As you can see im desperate to set this ID, and have called it twice. But it doesnt get called at all, however, i know its processing these lines because the values are displayed in the browser and if i set STYLE="display:block" it displays what i want to dynamically hide and display when the user clicks.

Please help.