dhtmlxMenu as pop up

Is there some smart way to use dhmlxMenu as a pop up menu ?
That is wihout showing the parent item.

Did some experimenting myself, but encountered an error I have not been able to solve.

The code is:
AVVMenu = new dhtmlXMenuObject();
// AVVMenu.setIconsPath(“v12js/dhtmlxMenu/samples/common/imgs/”);
AVVMenu.renderAsContextMenu();

AVVMenu.addNewSibling(null, “file”, “File”, false);
// AVVMenu.addNewChild(“file”, 0, “file_new”, “New”, false);

addNewSibling gives an error at:
if (pos > polygon.childNodes.length - 1)
in dhtmlxmenu.js. ( v2.5 build 090904 )
because polygon is undefined.

The html file is: