How to find out if tab is already exist?

Before I open a new tab in the tabbar - i need to verify if tab with the same ID is not exist.
I did not find any method in the tabbar API, so I extend the javascript “dhtmlxtabbar.js” with new method:

// retrun the boolen flag if tab with id already exists
tabExist:function (id){
var tab=this._tabs[id];
if (tab == null) return false;
return true;
},

Does anybody know the regular way hot to do the similar thing?

Thanks

Get an array of tabs IDs the next way:

var tabs = []; for(var id in tabbar._tabs) tabs = tabs.push(id)
Then find particular ID in this list.

Just one correction: instead of tabs = tabs.push(…), just tabs.push(…)

var tabs = []; for (var id in myTabbar._tabs) { tabs.push(id); } ...

It would be nice to have the regular functions which evaluate the tab existence in the next version.

Thanks

In the next version will be method

tabbar.getAllTabs()