//
// Based on the Agent ID, a different popup may be presented allowing 
// the user to select the system they wish to launch.
//
function LaunchExternalSystemPanel() 
{
    TorrentNA = document.aspnetForm.ctl00$ctl00$cphContent$TorrentNA.value;
    TorrentTX = document.aspnetForm.ctl00$ctl00$cphContent$TorrentTX.value;
    ICAT = document.aspnetForm.ctl00$ctl00$cphContent$ICAT.value;
    
    if (TorrentNA == "Y" || TorrentTX == 'Y' || ICAT == 'Y')
        {
            showLayer('ExternalSystemPanel');
            
            if (TorrentNA == "N")
                hideLayer('trTorrentNA');
                
            if (TorrentTX == "N")
                hideLayer('trTorrentTX');
                
            if (ICAT == "N")
                hideLayer('trICAT');
        }
    else
        {
            makeMaxWin('/Forms/AutoLogin.aspx?system=CGI');
        }
}

//
//Show Layer Function
//
function showLayer(Layer) 
{ 
    document.getElementById(Layer).style.display = "block";
}

//
//Hide Layer Function
//
function hideLayer(Layer) 
{	
    document.getElementById(Layer).style.display = "none"
}

//
//Open Link for North America Flood
//
function launchNAtorrent()
{
    window.open('/Forms/AutoLogin.aspx?system=TorrentNA');
    //window.open('https://uicna.torrentflood.com');
}

//
//Open Link for Texas Flood
//
function launchTXtorrent()
{
    window.open('/Forms/AutoLogin.aspx?system=TorrentTEX');
    //window.open('https://uictx.torrentflood.com');
}

//
//Open Link for Universal Policy Admin System
//
function launchPAS()
{
    makeMaxWin('/Forms/AutoLogin.aspx?system=CGI');
}


//
//Open Link for ICAT
//
function launchICAT()
{
    makeMaxWin('/Forms/AutoLogin.aspx?system=ICAT');
    //makeMaxWin('https://www.icat.com/agent/operations/gateway.cfm');
}



function LaunchCheckCGIOutage() {
    makeMaxWin('/en-US/System-Availability/');
}