// the global variables for the tab functions 
var active = null;

var activebgcolor = "#354463";
var activetextcolor = "black";


var inactivebgcolor = "#5F7797";
var inactivetextcolor = "#e9f2fc";

var overbgcolor = "#354463";
var overtextcolor = "#cccccc";

// the tab appearance changing function
function tabcolor(tabnum,color1,color2) 
{
	tab = eval(tabArray[tabnum]);
	tabtext = eval(tabTextArray[tabnum]);
	tab.backgroundColor = color1;
	tabtext.color = color2;

	if (document.all) 
	{
		tabtext.cursor = 'hand';
	}
	else 
	{
		tabtext.cursor = 'pointer';
	}
}

// the central tab navigation function 
function choosebox(num) 
{
	if (document.all || document.getElementById) 
	{ 
		if (active) 
		{
			activetablayer = eval(tabArray[active]);
			activetabtext = eval(tabTextArray[active]);
			activeboxlayer = eval(boxArray[active]);
			activetablayer.zIndex = 0;
			activeboxlayer.zIndex = 0;
			tabcolor(active,inactivebgcolor, inactivetextcolor);
        }
		tablayer = eval(tabArray[num]);
		tabtext = eval(tabTextArray[num]);
		boxlayer = eval(boxArray[num]);
		tablayer.zIndex = 11;
		boxlayer.zIndex = 10;
		tabcolor(num,activebgcolor, activetextcolor);
		active = num;
	}
}

// invoked onmouseover the tab 
function tabover(tabnum) 
{
	if (tabnum != active) 
	{
		tabcolor(tabnum,overbgcolor,overtextcolor);
	}
}

//invoked onmouseout of the tab 
function tabout(tabnum) 
{
	if (tabnum != active) 
	{
		tabcolor(tabnum,inactivebgcolor,inactivetextcolor);
	}
}
