If no one comes up with a solution, there is always the scriptcontrol object. If you search posts by my name and keyword scriptcontrol you will find a couple of examples.