Hi everyone,
Thanks for all your help. "rycamor" is in right direction, that is what I wanted (in his words):
There is absolutely no problem outputting valid Javascript from a CGI, SSI, or any server-side activity, as long as what is output fits the bill for client-side Javascript...