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 / ALERTAST.JS < prev    next >
Encoding:
JavaScript  |  2003-09-06  |  5.5 KB  |  194 lines

  1. ///////////////////////////////////////////////////////////////////////////
  2. //
  3. //strKnownApplicationList is the list of known programs.  When adding to this
  4. //list, be sure to prepend the operating system type to the new entries.
  5. //The following operating system types are supported:
  6. //98, me, 2k, xp
  7. //
  8. ///////////////////////////////////////////////////////////////////////////
  9.  
  10. var strKnownApplicationList = "98_subsystem,98_svchost.exe,98_rundll32.exe,98_wininit.exe,me_subsystem,me_svchost.exe,me_rundll32.exe,me_explorer.exe,me_spool32.exe, 2k_subsystem,2k_svchost.exe,2k_mstask.exe,2k_navapw32.exe,2k_csrss.exe,2k_lsass.exe,2k_winlogon.exe, xp_subsystem,xp_svchost.exe,xp_mstsc.exe,xp_rdpclip.exe,xp_mstask.exe,xp_navapw32.exe,xp_csrss.exe,xp_lsass.exe";
  11.  
  12.  
  13. function getArgs()
  14. {
  15.   var args = new Object();
  16.   var query = window.external.ObjectArg.Params;
  17.   
  18.   if(query.charAt(0) == "#")
  19.   {
  20.     query = query.substr(1);
  21.   }
  22.   
  23.   var pairs = query.split(",");               // Break at comma.
  24.   for(var i = 0; i < pairs.length; i++)
  25.   {
  26.     var pos = pairs[i].indexOf('=');          // Look for "name=value".
  27.     if (pos == -1)
  28.       continue;                               // If not found, skip.
  29.     var argname = pairs[i].substring(0,pos);  // Extract the name.
  30.     var value = pairs[i].substring(pos+1);    // Extract the value.
  31.     args[argname] = unescape(value);          // Store as a property.
  32.   }
  33.   return args;                                // Return the object.
  34. }
  35.  
  36. function DrawFooter()
  37. {
  38.     //Depending on the version of the product, pick the
  39.     //appropriate footer graphic
  40.  
  41.     var WrapNisum = new ActiveXObject("WrapUM.WrapNISUM");
  42.     var pt = WrapNisum.ProductType;
  43.     var szFooter;
  44.     
  45.     switch(pt)
  46.     {
  47.     case "PT_NPF":
  48.         szFooter = "<img border=0 src=\"branding_bar_npf.gif\"/>";
  49.            break;
  50.     case "PT_PRO":
  51.         szFooter = "<img border=0 src=\"branding_bar_nispro.gif\"/>";
  52.            break;
  53.     default:
  54.         szFooter = "<img border=0 src=\"branding_bar.gif\"/>";
  55.            break;
  56.     }
  57.     
  58.     document.write(szFooter);
  59. }
  60.  
  61. function DrawPopup(strProgramName)
  62. {
  63.     //alert("KnownApplications.htm#" + strProgramName + "#" + location.href);
  64.     window.navigate("KnownApplications.htm#" + strProgramName + "#" + location.href);
  65. }
  66.  
  67. function DrawProgramName(strProgramName)
  68. {
  69.     //Build string to represent which operating system we have.  This will be appended to the program name
  70.     //when we test to see if it is one we have additional info for.
  71.     var args = getArgs();
  72.     var strProgNameWithOS = strProgramName;
  73.  
  74.     //Special case for "Windows Subsystem"
  75.     if (strProgNameWithOS == "Windows Subsystem")
  76.     {
  77.         strProgNameWithOS = "subsystem";
  78.     }
  79.  
  80.     if (args.os)
  81.     {
  82.       strProgNameWithOS = args.os + "_" + strProgNameWithOS;
  83.     }
  84.  
  85.     strKnownApplicationList = strKnownApplicationList.toLowerCase();
  86.     if (strKnownApplicationList.indexOf(strProgNameWithOS.toLowerCase()) >= 0)
  87.     {
  88.         oPROGNAME.innerHTML = "<a href='KnownApplications.htm" + "?from=" + location.href + "#" + strProgramName + "' onClick=\"DrawPopup('" + strProgNameWithOS + "');return false\">" + strProgramName + "</a>";
  89.         //alert(oPROGNAME.innerHTML);
  90.     }
  91.     else
  92.     {
  93.         oPROGNAME.innerText = strProgramName;
  94.     }
  95. }
  96.  
  97. function VisualTracking_OnClick(objAnchor)
  98. {
  99.     window.open(String(objAnchor.href), String(objAnchor.target), "width=830, height=785, toolbar=no, menubar=no, location=no, directories=no, resizable=yes, scrollbars=yes");
  100.     return false;
  101. }
  102.  
  103. function GetCountryCode()
  104. {
  105.     return navigator.systemLanguage;
  106. }
  107.  
  108. function DrawVisualTrackingLink(strIPAddr)
  109. {
  110.     var szLangID = GetCountryCode();
  111.  
  112.     // Figure out what version of the product this is
  113.     //
  114.  
  115.     // var pt = WrapNisum.ProductType;
  116.     var pid = "NIS2004";
  117.     var pt;
  118.     var args = getArgs();
  119.     
  120.     if (args.pt)
  121.     {
  122.         switch(pt)
  123.         {
  124.         case "PT_NPF":
  125.            pid = "NPF2004";
  126.            break;
  127.         case "PT_SCF":
  128.            pid = "SCF2004";
  129.            break;
  130.         case "PT_PRO":
  131.            pid = "NISPro2004";
  132.            break;
  133.         default:
  134.            pid = "NIS2004";
  135.            break;
  136.         }
  137.     }
  138.  
  139.     var strRet = "<a href='http://visualtracking.symantec.com/default.asp?productid=" + pid + "&langid=" + szLangID + "&venid=sym" + "&go=" + strIPAddr + "' target='VisualTracking' onClick='return VisualTracking_OnClick(this)'>" + strIPAddr + "</a>";
  140.     return strRet;
  141. }
  142.  
  143. function ToggleMoreDetails()
  144. {
  145.     if(window.oMORE_DETAILS_TEXT.style.display == "")
  146.     {
  147.         window.oMORE_DETAILS_TEXT.style.display ="none";
  148.         img_Arrow_MoreDetails.src = "blue_arrow_rt.gif";
  149.     }
  150.     else
  151.     {
  152.         window.oMORE_DETAILS_TEXT.style.display ="";    
  153.         img_Arrow_MoreDetails.src = "blue_arrow_dn.gif";
  154.     }
  155. }
  156.  
  157. function ToggleReduceAlerts()
  158. {
  159.     if(window.oREDUCE_ALERTS_TEXT.style.display == "")
  160.     {
  161.         window.oREDUCE_ALERTS_TEXT.style.display ="none";
  162.         img_Arrow_ReduceAlerts.src = "blue_arrow_rt.gif";
  163.     }
  164.     else
  165.     {
  166.         window.oREDUCE_ALERTS_TEXT.style.display ="";    
  167.         img_Arrow_ReduceAlerts.src = "blue_arrow_dn.gif";
  168.     }
  169. }
  170.  
  171. function ToggleWhatShouldIDo()
  172. {
  173.     if(window.oWHAT_SHOULD_I_DO_TEXT.style.display == "")
  174.     {
  175.         window.oWHAT_SHOULD_I_DO_TEXT.style.display ="none";
  176.         img_Arrow_WhatShouldIDo.src = "blue_arrow_rt.gif";
  177.     }
  178.     else
  179.     {
  180.         window.oWHAT_SHOULD_I_DO_TEXT.style.display ="";
  181.         img_Arrow_WhatShouldIDo.src = "blue_arrow_dn.gif";
  182.     }
  183. }
  184.  
  185. function CollapseSections()
  186. {
  187.     // Collapse these text by default
  188.     window.oMORE_DETAILS_TEXT.style.display ="none";
  189.     img_Arrow_MoreDetails.src = "blue_arrow_rt.gif";
  190.     window.oREDUCE_ALERTS_TEXT.style.display ="none";
  191.     img_Arrow_ReduceAlerts.src = "blue_arrow_rt.gif";
  192.     window.oWHAT_SHOULD_I_DO_TEXT.style.display ="none";
  193.     img_Arrow_WhatShouldIDo.src = "blue_arrow_rt.gif";
  194. }