Show tab on condition basis

I have two tabbar. tabbar1 & tabbar 2. tabbar1 has 3 tab Tab1,Tab2,Tab3. tabbar2 has two tab TabX& TabY. I want to show Tab1,Tab2 when user click on TabX & Tab1 & Tab3 when user click on TabY.

Please help.

Thanks in advance

There are hideTab/showTab methods in tabbar. These methods can be used to change the tabs set in tabbar1.

For tabbar2 you may set onSelect event handler. This event is called when the active tab changes:

tabbar2.attachEvent(“onSelect”,function(id){
if(id==“tabX”){
tabbar1.hide(“tab3”,true);
tabbar1.show(“tab2”,true);
}
else{
tabbar1.hide(“tab2”,true);
tabbar1.show(“tab3”,true);
}
return true;
})