A circular reference is created when showing a sub menu that is not cleaned on page unload. This causes leaks in IE. You can see this leak in sIEve (http://home.wanadoo.nl/jsrosman/) on the demo page http://jscook.yuanheng.org/JSCookMenu/ThemeOffice.html. This can be fixed by added an event to the window onunload to break this circular reference.
I am using xAddEventListener from the the x library (http://www.cross-browser.com/x/lib/view.php?sym=xAddEventListener)
I assume you don't want a dependency on another library, so you will need to find a cross-browser way to do this, but I'm already using the x library, so here is an example of how to fix this leak...
function cmShowSubMenu (obj, isMain, subMenu, menuInfo)
{
var prefix = menuInfo.prefix;
if (!subMenu.cmParentMenu)
{
// establish the tree w/ back edge
var thisMenu = cmGetThisMenu (obj, prefix);
subMenu.cmParentMenu = thisMenu;
if (!thisMenu.cmSubMenu)
thisMenu.cmSubMenu = new Array ();
thisMenu.cmSubMenu[thisMenu.cmSubMenu.length]
= subMenu;
xAddEventListener(window,"unload",
function() {
subMenu.cmParentMenu = null;
},false)
}
...