I've looked at javscript::spidermonkey but it seems like overkill.
In reply to call js function from CGI? by Anonymous Monk