//get values of container background color and foreground color
var sForeColor = parentElement.style.color;
var sBackColor = parentElement.style.background;
//determine value of iTop for placement of tabs
var iTop = null;
if(parentElement.style.tdTabOrientation.toUpperCase() == "TOP") iTop = -22;
if(parentElement.style.tdTabOrientation.toUpperCase() == "BOTTOM") iTop = parentElement.style.posHeight - 2;
<SCRIPT LANGUAGE="jscript">
var StyleInfo;
var StyleRules = new Array();
var iIndex = null;
function DoInit()
{
//if container....
if(tagName=="container")
{
style.position = "absolute";
CumulativeTabWidth = -1;
if(selectedIndex==null) selectedIndex = 1;
SetDefaults();
ContainerHeight = style.posHeight;
}
if(tagName=="page")
{
var iIndex = null;
for(c=0; c<parentElement.children.length; c++)
{
if(element == parentElement.children(c)) iIndex = c + 1;
}
//create and insert the HTML that is the content area for the tab
MakeContent();
//determine the width of this tab, using a simple algorithm (fairly reliable,
//since the font family and size are restricted
var iWidth = 6*parseInt(TABTEXT.length);
//create and insert the HTML that is the tab
MakeTab(parentElement.CumulativeTabWidth+1, iWidth+6, TABTEXT, TABTITLE, iIndex);
//create a stylesheet for the tab
CreatePageStyleSheet();
//determine which tab in the collection this one is. If last, do some configuring
var Tabs = window.document.all("Tab");
if(parentElement.children.length == 1)
{
SelectTab();
SelectContent();
SetTabTop();
ConfirmContainerWidth();
SetContainerHeight();
}
else
{
if(Tabs.length == parentElement.children.length)
{
SelectTab();
SelectContent();
SetTabTop();
ConfirmContainerWidth();
SetContainerHeight();
}
}