Selecting Tab from another html-file

I have a problem selecting a tab out of an iFrame…

Example:

index.html: includes defined div for the tabbar (Tab A an Tab B)
a.html: html-file to be shown in iFrame by selecting Tab A
b.html: html-file to be shown in iFrame by selecting Tab B

Now I have to switch to Tab B by clicking a link in a.html… but the instance of the tabbar defined in index.html doesn’t exist in a.html. How can I do that? Is there any other possibility to switch tabs out of html-files loaded in the inner iFrames?

Regards

parent.tabbar.setTabActive(“tab_b_id”);

Where tabbar is the object of tabbar that is defined in in index.html