/* The tab navigation script. Always use in conjunction with docobj.js! */

// Set up array of tab element style property strings 

var tabArray = new Array(14);
tabArray[0] = null;
tabArray[1] = getStyleObj('tab1');
tabArray[2] = getStyleObj('tab2');
tabArray[3] = getStyleObj('tab3');
tabArray[4] = getStyleObj('tab4');
tabArray[5] = getStyleObj('tab5');
tabArray[6] = getStyleObj('tab6');
tabArray[7] = getStyleObj('tab7');
tabArray[8] = getStyleObj('tab8');
tabArray[9] = getStyleObj('tab9');
tabArray[10] = getStyleObj('tab10');
tabArray[11] = getStyleObj('tab11');
tabArray[12] = getStyleObj('tab12');
tabArray[13] = getStyleObj('tab13');


// Set up array of tabmiddle td element style property strings 

var tabTextArray = new Array(14);
tabTextArray[0] = null;
tabTextArray[1] = getStyleObj('tabmiddle1');
tabTextArray[2] = getStyleObj('tabmiddle2');
tabTextArray[3] = getStyleObj('tabmiddle3');
tabTextArray[4] = getStyleObj('tabmiddle4');
tabTextArray[5] = getStyleObj('tabmiddle5');
tabTextArray[6] = getStyleObj('tabmiddle6');
tabTextArray[7] = getStyleObj('tabmiddle7');
tabTextArray[8] = getStyleObj('tabmiddle8');
tabTextArray[9] = getStyleObj('tabmiddle9');
tabTextArray[10] = getStyleObj('tabmiddle10');
tabTextArray[11] = getStyleObj('tabmiddle11');
tabTextArray[12] = getStyleObj('tabmiddle12');
tabTextArray[13] = getStyleObj('tabmiddle13');


// Set up array of text box element style property strings

var boxArray = new Array(14);
boxArray[0] = null;
boxArray[1] = getStyleObj('box1');
boxArray[2] = getStyleObj('box2');
boxArray[3] = getStyleObj('box3');
boxArray[4] = getStyleObj('box4');
boxArray[5] = getStyleObj('box5');
boxArray[6] = getStyleObj('box6');
boxArray[7] = getStyleObj('box7');
boxArray[8] = getStyleObj('box8');
boxArray[9] = getStyleObj('box9');
boxArray[10] = getStyleObj('box10');
boxArray[11] = getStyleObj('box11');
boxArray[12] = getStyleObj('box12');
boxArray[13] = getStyleObj('box13');

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

var activebgcolor = "#041274";
var activetextcolor = "white";


var inactivebgcolor = "rgb(102,153,204)";
var inactivetextcolor = "white";

var overbgcolor = "rgb(102,153,204)";
var overtextcolor = "#041274";


// 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);
 }
}

