﻿
// IMAGE SWAPS //


function ShowLeftSection(ThisLink, LeftTable){

    //hide all tables
    var allTables = document.getElementsByTagName("table");
    for(var i=0; i<allTables.length; i++){
        if(allTables[i].className.indexOf("LeftTable")>-1){
            allTables[i].style.display = "none"                                                    
        } 
    }    
       

    //set all links  to off
    var allLinks = document.getElementsByTagName("a");
    for(var i=0; i<allLinks.length; i++){
        //Set tab Headings
        if(allLinks[i].className.indexOf("LeftSide")>-1){
            allLinks[i].className = "LeftSide_Off"                                                     
        } 
    }
    
    //show current table    
    var tbCurrentTable = document.getElementById(LeftTable);
    tbCurrentTable.style.display = "block";           

    //set current link css
    ThisLink.className = "LeftSide_On";   
}

function DisableFileControl(FileControl){

    alert(FileControl);
}

function SideMouseOver(imgThis, strSide){


    //set src
    imgThis.src =  GetSideImgPath(strSide, "over");        
}

function SideMouseOut(imgThis, strSideName){

    //set src
    imgThis.src =  GetSideImgPath(strSideName, "normal");       
}


function GetSideImgPath(strText, strState){
        
    var strPath = "none"
    var strDirectory = "/Images/MiddleContent/";
    
    if(strState=="over"){
        //hover path
        strPath = strDirectory + strText + "_over.png";    
    }
    else{
         //normal path
        strPath = strDirectory + strText + ".png";    
    }

    //return path
    return strPath

}