function link(url) {
window.location=url;
}
function ActiveTableON(id) {
document.getElementById(id).className = "ActiveTable";
document.getElementById(id+"link").className = "ActiveTableLink";
}
function ActiveTableOFF(id) {
document.getElementById(id).className = "";
document.getElementById(id+"link").className = "";
}
subsdownload = new Array();
subsdownload[1] = 'off';
subsdownload[2] = 'off';
subsdownload[3] = 'on';

function display_download(sid)
{
    for(var i=0; i<subsdownload.length; i++)
    {
        if(subsdownload[i]=='on')
       {
            document.getElementById("download"+i).style.display='none';
            subsdownload[i]='off';
       }
    }

    if(subsdownload[sid]=='off')
    {
        document.getElementById("download"+sid).style.display='block';
        subsdownload[sid]='on';
    }
    if("opt"+sid=="opt3"){
    document.getElementById("opt1").src='/images/inc/download/gallery_off.png';
    document.getElementById("opt2").src='/images/inc/download/comment_off.png';
    document.getElementById("opt3").src='/images/inc/download/about_on.png';
    } else if("opt"+sid=="opt2"){
    document.getElementById("opt1").src='/images/inc/download/gallery_off.png';
    document.getElementById("opt2").src='/images/inc/download/comment_on.png';
    document.getElementById("opt3").src='/images/inc/download/about_off.png';
    } else if("opt"+sid=="opt1"){
    document.getElementById("opt1").src='/images/inc/download/gallery_on.png';
    document.getElementById("opt2").src='/images/inc/download/comment_off.png';
    document.getElementById("opt3").src='/images/inc/download/about_off.png';
    } 
}
function nondisplay_download(sid)
{
    if(subsdownload[sid]=='on')
    {
        document.getElementById("download"+sid).style.display='none';
        subsdownload[sid]='off';
    }
}
