﻿
function wo_show(tab){    
    // toggle shown
    tab.shown = (tab.shown == 1) ? 0 : 1;

    // hide or show all buttons
    var dsp = tab.shown ? "none" : "block";
    var tabs = document.getElementById("wo_wrapper").getElementsByTagName("div");
    for(var i = 0; i < tabs.length; i++)
            if(tabs[i].className == "wo_tab")
                tabs[i].style.display = dsp;

    // show 'tab' and its content
    tab.parentNode.style.display = "block";
    tab.style.backgroundPosition = tab.shown ? "center -47px" : "center 0";
    tab.parentNode.getElementsByTagName("div")[0].style.display = tab.shown ? "block" : "none";
}







// international / radio //

function show_tab(tab){
    var info = tab.getElementsByTagName("span")[0].innerHTML;
    var box = tab.parentNode.getElementsByTagName("p")[0];
    
    var my_span = document.createElement("span");
    my_span.innerHTML = info;
    box.innerHTML = "";
    box.appendChild(my_span);
    
    if(tab.className == "radioTab"){
        document.getElementById("BYURadioTab").style.backgroundPosition = "0 0";
        document.getElementById("RadioIntTab").style.backgroundPosition = "-104px 0";
        document.getElementById("InstrumentalTab").style.backgroundPosition = "-208px 0";
    } else if(tab.className == "intTab"){
        document.getElementById("EnglishTab").style.backgroundPosition = "0 0";
        document.getElementById("SpanishTab").style.backgroundPosition = "-104px 0";
        document.getElementById("PortTab").style.backgroundPosition = "-208px 0";
    }
    
    horiz = tab.style.backgroundPosition.split(" ")[0];
    tab.style.backgroundPosition = horiz + " -21px";
}