sorry, didn't explain myself really.
i want to be able to generate the menu items and submenus from php so that the site owner can configure their shopping catagories accordingly.
I have created the code to do this but i then need to parse it in such a way that it creates new javascript menu items, hence the need for tidy js code.
Thanks, i'll have a looksie at that script,
Hugh