A while ago, I wrote a tutorial explaining how to create an ActiveX control and use it inside a sidebar gadget.  If you are finding yourself limited by the capabilities of DHTML and script in your gadget development, you will find this a useful way to add additional power and capabilities to your gadget.  (At the cost of some additional deployment complexity.)

I've attached a Word document with the whole tutorial; or if you prefer to view it online, you can check out the original posts on my personal blog:

Powering Your Gadgets With ActiveX (part 1)

Powering Your Gadgets With ActiveX (part 2)

Powering Your Gadgets With ActiveX (part 3)