// 2006-02-18T04:38:48-0800
// Xah Lee.org

// a list of all files associated with each tab, minus the ".html" suffix.
var tabNames= new Array("default","database","web","itstrategy","aboutus");

function setTabs() {
    // determine the current tab, from file path
    pa=document.location.pathname.split('/');
    cT=(pa[pa.length-1]).split('.')[0].toLowerCase();
    if (cT=="") 
    {
        cT="default";
    }
    
    // go thru all tabs, if match, change tab to #56aa1c, else silver
    for (var t in tabNames) {
        if (tabNames[t]==cT) 
        {
            document.getElementById(tabNames[t]).style.backgroundImage="url(images/tabselected.jpg)";
        }
        else
        {
            document.getElementById(tabNames[t]).style.backgroundImage="url(images/tab.jpg)";
            document.getElementById(tabNames[t]).onmouseover = new Function("document.getElementById('" + tabNames[t] + "').style.color='#800000';this.style.cursor = 'hand';");
            document.getElementById(tabNames[t]).onmouseout = new Function("document.getElementById('" + tabNames[t] + "').style.color='white';this.style.cursor = 'auto';");
        }

    }
}
document.getElementById("default").onclick = function () {open("default.aspx","_parent");};
document.getElementById("database").onclick = function () {open("database.aspx","_parent");};
document.getElementById("web").onclick = function () {open("web.aspx","_parent");};
document.getElementById("itstrategy").onclick = function () {open("itstrategy.aspx","_parent");};
document.getElementById("aboutus").onclick = function () {open("aboutus.aspx","_parent");};

