Issues with dhtmlxtabbar

Hi,
My requirement is to have a tabbar where I can dynamically load multiple tabs. Each tab then loads a dhtmlxlayout object which in turn loads a grid and a toolbar. I have also enabled the close button on the tabbar.
When I close any of the tabs, and then I start loading new tabs after this instant the toolbar contained inside the layout fails to load giving me this error
Message: Object required
Line: 8
Char: 144
Code: 0
URI: /dhtmlxToolbar/codebase/dhtmlxtoolbar.js
Could you please advise , please do let me know if you need any additional details ?
Thx
Arjun

Hi,

please attach the completed demo:

docs.dhtmlx.com/doku.php?id=othe … leted_demo