If you want to create a separate control to do this, you should have a property with the ID of the control on which you want to bind it. Then in OnPreRender you get the control (using FindControl) and then determine if it is inherited from HtmlControl or WebControl - then you can add the javascript into their Attributes ["onmoseover"], if the control is not inherited from these classes then I have no idea if it can be done or if you need to do it. For majority of controls this should work.
Martin Pernecky
NetPublisher CMS