/**
 * Performs minitab switching using the Javascript DOM
 *
 * Parameter: divId - The id of the DIV that has the minitab content to be displayed
 * Parameter: linkId - the id of the link (minitab) that was clicked
 * Parameter: firstMinitab - the id of the first minitab in the minitab set
 *
 * Note: the minitabs, minitab, minitabActive, and minitabContent ids 
 *       could be global variables which might make maintenance easier
 */
function test(divId, linkId, firstMinitab) {
    if(document.getElementById(firstMinitab).innerHTML == "") {
        document.getElementById(firstMinitab).innerHTML = document.getElementById("minitabContent").innerHTML;
    }
    var minitabs = document.getElementById("minitabs").getElementsByTagName("a");
    if(minitabs.length > 0) {
        for(i=0; i < minitabs.length; i++) {
            minitabs[i].className = "minitab";
        }
    }
    document.getElementById(linkId).className = "minitabActive";
    document.getElementById("minitabContent").innerHTML = document.getElementById(divId).innerHTML;
}
