// Show/Hide JavaScript


// pulls in toggle stylesheet
if (document.getElementById){
    document.write("<link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"/media/shared/css/showhide.css\">")
}


// Toggle 
function toggle(show,hide,section){
    if (document.getElementById){
        // this is the way the standards work
        var secStyle = document.getElementById(section);
        secStyle.className = (secStyle.className == "toggleShow" ? "toggleHide":"toggleShow");
                // toggle button: show detail
        var showStyle = document.getElementById(show);
        showStyle.className = (showStyle.className == "toggleShow" ? "toggleHide":"toggleShow");
                // toggle button: hide detail
        var hideStyle = document.getElementById(hide);
        hideStyle.className = (hideStyle.className == "toggleShow" ? "toggleHide":"toggleShow");
    }else if (document.all){
        // this is the way old msie versions work
        var secStyle = document.all[section];
        secStyle.className = (secStyle.className == "toggleShow" ? "toggleHide":"toggleShow");
                // toggle button: show detail
        var showStyle = document.all[show];
        showStyle.className = (showStyle.className == "toggleShow" ? "toggleHide":"toggleShow");
                // toggle button: hide detail
        var hideStyle = document.all[hide];
        hideStyle.className = (hideStyle.className == "toggleShow" ? "toggleHide":"toggleShow");
    }else if (document.layers){
        // this is the way nn4 works
        var secStyle = document.layers[section];
        secStyle.className = (secStyle.className == "toggleShow" ? "toggleHide":"toggleShow");
        var showStyle = document.layers[show];
        showStyle.className = (showStyle.className == "toggleShow" ? "toggleHide":"toggleShow");
                // toggle button: hide detail
        var hideStyle = document.layers[hide];
        hideStyle.className = (hideStyle.className == "toggleShow" ? "toggleHide":"toggleShow");
    }
}

