Hi Daniel,
Try using the JsCookMenu, this is a cool jsf component,
http://jscook.yuanheng.org/JSCookMenu/, also you might want to try the myfaces libiary from apache.
Or you could just use your JavaScript menu as it is, though you might encounter a few changes in getting reference to the elements ( if needed ), so you will have to change a statement like
document.getElementById("elementId"); // normal HTML
document.getElementById("formname:elementId"); // incase of JSF,
so with a few modifications to your existing script, you should be good to go.
Good luck.
Allen.
[ January 30, 2007: Message edited by: Allen Mathew Williams ]