The JavaScript isn't being produced by CGI, it's just being called by the CGI script. It lives in its own separate file and gets called in with a -script=> line. I just included it on the chance that I had written the JavaScript wrong and that the CGI could be rewritten to work correctly if the JavaScript could be rewritten. Or something like that.