Multiselect Option Transfer Custom Control - sharing this if anyone needs it

Attached is the rx_Templates.xsl file I have used to implement a custom control in which you can have 2 multi-select boxes and shuttle options back and forth between them, similar to what you see here: http://blog.jeremymartin.name/2008/02/easy-multi-select-transfer-with-jquery.html.

This is an array-based control like a multi-checkbox, multi-select, etc. which brings in the choices selected by the author of the content type (in our case, this is an XML application based on data from another content type). The “trick” in getting this to persist is to intercept the submit event and then javascript selects all the elements in the select box on the right hand side to they are send in the HTTP request (which represents all the options the user wants to select). The XSL uses populates the right side select with the chosen options and the left side select with the options that are not chosen. XSLT makes my heard hurt, so I got this to work by looking at other controls, experimenting and somehow got functioning, therefore I can’t tell you exactly why it works :). So, I’m sure that part of it can probably be done much more efficiently than I have.

It references an external javascript file which handles the moving of the options back and forth, which I can also give you if you need it, but if you now anything about Javascript, that is pretty easy stuff.