Access a table in WebBrowser(MSHTML)

Could someone let me know how I can detect whether the cursor is in a table in Webrowser (edit mode). After detecting the table I would like to modify its properties. The code i was using for DHTML does not work with MSHTML.Thanx