Bill,
>Yea, too much work.
>I finally decided just to do an OKL to toggle it on and off.
Why not just take an easy way out, put your javascript code into a .js file. Your gen code could then just textmerge out a filetostr("x.js"). You could even use a Java aware editor to edit the script code.