home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2004 July / APC0407D1.iso / powerkit / firewall / files / NPF2004.exe / Setup / ISCommon / APP / AlertAst.exe / HTML / INTERNETACCESS.JS < prev    next >
Encoding:
Text File  |  2003-09-06  |  3.9 KB  |  191 lines

  1. function OnLoad()
  2. {
  3.     //Internal replacable strings
  4.     //oPROGNAME
  5.     //oREMADDR
  6.     //oREMPORT
  7.     //oLOCPORT
  8.     //oTRUSTEDCOMPANY
  9.     
  10.     var args = getArgs();
  11.     
  12.     if (args.ProgName)
  13.     {
  14.       //oPROGNAME.innerText = args.ProgName;
  15.       DrawProgramName(args.ProgName);
  16.     }    
  17.  
  18.     if (args.remaddr)
  19.     {
  20.       oREMADDR.innerHTML = DrawVisualTrackingLink(args.remaddr);
  21.     }
  22.     
  23.     if (args.remport)
  24.     {
  25.       oREMPORT.innerText = args.remport;
  26.     }
  27.     
  28.     if (args.locport)
  29.     {
  30.       oLOCPORT.innerText = args.locport;
  31.     }
  32.     
  33.     if (args.risk)
  34.     {
  35.       switch(args.risk)
  36.       {
  37.          case "0":
  38.             idstrRiskLow.style.display = "";
  39.             break;
  40.          case "1":
  41.             idstrRiskMedium.style.display = "";
  42.             break;
  43.          default:
  44.             idstrRiskHigh.style.display = "";
  45.             break;
  46.       }
  47.     }
  48.     
  49.     if (args.virscan)
  50.     {
  51.       switch(args.virscan)
  52.       {
  53.         case "0":
  54.             idstr_VIRUSResult0.style.display = "";
  55.             idimg_VSIcon_Check.style.display = "";
  56.             break;
  57.         //Virus Type
  58.         case "1":
  59.             idimg_VSIcon_Warning.style.display = "";
  60.             if(args.virusthreatcat)
  61.             {
  62.                 switch(args.virusthreatcat)
  63.                 {
  64.                     // Threat Category 0-3 = Virus Found
  65.                     case "0":
  66.                     idstr_VIRUSThreatCat0.style.display = "";
  67.                     break;
  68.                     case "1":
  69.                     idstr_VIRUSThreatCat0.style.display = "";
  70.                     break;
  71.                     case "2":
  72.                     idstr_VIRUSThreatCat0.style.display = "";
  73.                     break;
  74.                     case "3":
  75.                     idstr_VIRUSThreatCat0.style.display = "";
  76.                     break;
  77.                     case "5":
  78.                     idstr_VIRUSThreatCat2.style.display = "";
  79.                     break;
  80.                     case "6":
  81.                     idstr_VIRUSThreatCat3.style.display = "";
  82.                     break;
  83.                     default:
  84.                     break;
  85.                 }
  86.             }
  87.             break;
  88.         case "2":
  89.             idstr_VIRUSResult2.style.display = "";
  90.             idimg_VSIcon_Warning.style.display = "";
  91.             break;        
  92.         case "3":
  93.             idstr_VIRUSResult3.style.display = "";
  94.             idimg_VSIcon_Warning.style.display = "";
  95.             break;
  96.         // Threat Type    
  97.         case "5":
  98.             idimg_VSIcon_Warning.style.display = "";
  99.             if(args.virusthreatcat)
  100.             {
  101.                 switch(args.virusthreatcat)
  102.                 {
  103.                     case "4":
  104.                     idstr_VIRUSThreatCat1.style.display = "";
  105.                     break;
  106.                     case "7":
  107.                     idstr_VIRUSThreatCat4.style.display = "";
  108.                     break;
  109.                     case "8":
  110.                     idstr_VIRUSThreatCat5.style.display = "";
  111.                     break;
  112.                     case "9":
  113.                     idstr_VIRUSThreatCat6.style.display = "";
  114.                     break;
  115.                     case "10":
  116.                     idstr_VIRUSThreatCat7.style.display = "";
  117.                     break;
  118.                     case "11":
  119.                     idstr_VIRUSThreatCat8.style.display = "";
  120.                     break;
  121.                     //UnKnown
  122.                     case "-1":
  123.                     idstr_VIRUSThreatCat9.style.display = "";
  124.                     break;
  125.                     default:
  126.                     break;
  127.                 }
  128.             }
  129.             break;
  130.         
  131.         case "4"://Same as default
  132.         default:
  133.             idstr_VIRUSResult4.style.display = "";
  134.             idimg_VSIcon_Urgent.style.display = "";
  135.             break;
  136.       }
  137.     }
  138.     else
  139.     {
  140.       //Error state
  141.       idstr_VIRUSResult3.style.display = "";
  142.       idimg_VSIcon_Urgent.style.display = "";
  143.     }
  144.             
  145.     if (args.digisign)
  146.     {
  147.       switch(args.digisign)
  148.       {
  149.         case "1":
  150.             idstr_SignatureResult1.style.display = "";
  151.             idimg_DSIcon_Check.style.display = "";
  152.             break;
  153.         case "0"://Same as default
  154.         default:
  155.             idstr_SignatureResult0.style.display = "";
  156.             idimg_DSIcon_Warning.style.display = "";
  157.             break;
  158.       }
  159.     }
  160.     else
  161.     {
  162.       idimg_DSIcon_Urgent.style.display = "";
  163.       idstr_SignatureResult2.style.display = "";
  164.     }
  165.     
  166.     if(args.direction)
  167.     {
  168.         switch(args.direction)
  169.         {
  170.             case "Inbound":
  171.                 idstr_DirectionResult0.style.display = "";
  172.                 idimg_DirIcon_Check.style.display = "";
  173.                 idstrConnectFrom.style.display = "";
  174.                 break;
  175.             case "Outbound":
  176.                 idstr_DirectionResult1.style.display = "";
  177.                 idimg_DirIcon_Check.style.display = "";
  178.                 idstrConnectTo.style.display = "";
  179.                 break;
  180.             case "Either":
  181.             default:
  182.                 idstr_DirectionResult2.style.display = "";
  183.                 idimg_DirIcon_Check.style.display = "";
  184.                 idstrCommunicate.style.display = "";
  185.                 break;
  186.         }
  187.     }
  188.             
  189.     CollapseSections();
  190. }
  191.