// JavaScript Document

function elemFind(id) {
    if (document.getElementById != null) {
        return document.getElementById(id);
    }
    if (document.all != null) {
        return document.all[id];
    }
    if (document.layers != null) {
        return document.layers[id];
    }
    return null;
}


function changeTabBg(num) {

var tabZero = elemFind("tab0");
var tabOne = elemFind("tab1");
var tabTwo = elemFind("tab2");
var tabThree = elemFind("tab3");


if(num == 3) {
tabZero.style.background = "url(/images/tabs/up/tab_close.gif)";
tabOne.style.background = "url(/images/tabs/up/tab_products.gif)";
tabTwo.style.background = "url(/images/tabs/up_alt/tab_resources.gif)";
tabThree.style.background = "url(/images/tabs/on/tab_publications.gif)";
}

if(num == 0) {
tabZero.style.background = "url(/images/tabs/off/tab_close.gif)";
tabOne.style.background = "url(/images/tabs/off/tab_products.gif)";
tabTwo.style.background = "url(/images/tabs/off/tab_resources.gif)";
tabThree.style.background = "url(/images/tabs/off/tab_publications.gif)";
}

if(num == 1) {
tabZero.style.background = "url(/images/tabs/on/tab_close.gif)";
tabOne.style.background = "url(/images/tabs/on/tab_products.gif)";
tabTwo.style.background = "url(/images/tabs/up/tab_resources.gif)";
tabThree.style.background = "url(/images/tabs/up/tab_publications.gif)";
}
if(num == 2) {
tabZero.style.background = "url(/images/tabs/up/tab_close.gif)";
tabOne.style.background = "url(/images/tabs/up_alt/tab_products.gif)";
tabTwo.style.background = "url(/images/tabs/on/tab_resources.gif)";
tabThree.style.background = "url(/images/tabs/up/tab_publications.gif)";
}


}