﻿
function highlighPanelItem(item)
{
     
    document.getElementById(item).attributes["class"].value = "PanelItemSelected";   
    if (item=='divPanelLogon') 
    {   
        document.getElementById('divPanelOpen').style.display='none';
        document.getElementById('divPanelSecure').style.display='block';
    }
    else
    {
        if (document.getElementById('divPanelOpen')!=null)
        {
            document.getElementById('divPanelOpen').style.display='block';
            document.getElementById('divPanelSecure').style.display='none';
        }
    }
}
   

/* functions below are called by pop-up RAD Windwos
*/

function GetRadWindow()
{
    
    var oWindow = null;
    if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;//IE (and Moz az well)
    return oWindow;
}

function OpenRadWindow(WinName, MessageID)
{ 
    switch (WinName)
    {
        case 'DownloadLog':
            window.radopen("../downloadlog.aspx?MessageID=" + MessageID, "radWin");
            break;
             
//        case 'FileList':
//            window.radopen("../filelist.aspx?MessageID=" + MessageID, "radWin");
//            break;

        case 'AddFile':
            window.radopen("addfile.aspx?MessageID=" + MessageID, "radWin");
            break;
            
        
    }
}

function RadClose()
{    
     var oWindow = GetRadWindow();
     oWindow.close();
}


function RadRefreshFileList(autoSubmit)
{ 
    var oWindow = GetRadWindow();
    oWindow.Close();   
    oWindow.BrowserWindow.refreshFileList(autoSubmit);         
}

