home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2004 July / APC0407D1.iso / powerkit / firewall / files / NPF2004.exe / Setup / ISCommon / APP / SNLog.dll / HTML / SNLOG.JS < prev   
Encoding:
JavaScript  |  2003-09-06  |  2.1 KB  |  111 lines

  1. // JScript source code
  2. var bEnableBT = true;
  3. var ProdType;
  4.  
  5. function LaunchBackTrace(address)
  6. {
  7.     if (bEnableBT == false)
  8.         return;
  9.  
  10.     // Find the actually IP address (xxx.xxx.xxx.xxx).
  11.  
  12.     var begin = address.indexOf('(');
  13.     var end = address.indexOf(')');
  14.     var szIPAddress = address;
  15.     
  16.     if (begin < end && begin != -1)
  17.         szIPAddress = address.substring(begin+1, end);    
  18.     
  19.     // Determine the product ID.
  20.     
  21.     switch(ProdType)
  22.     {
  23.     case "PT_NPF":
  24.        ProdID = "NPF2004";
  25.        break;
  26.     case "PT_SCF":
  27.     case "PT_SDF":
  28.        ProdID = "SCF2004";
  29.        break;
  30.     case "PT_PRO":
  31.        ProdID = "NISPro2004";
  32.        break;
  33.     default:
  34.        ProdID = "NIS2004";
  35.        break;
  36.     }
  37.  
  38.     // Format the URL.
  39.  
  40.     var szURL = "http://visualtracking.symantec.com/default.asp?productid=" + ProdID + "&langid=" + navigator.systemLanguage + "&venid=sym" + "&go=" + szIPAddress;
  41.  
  42. //    window.open(szURL, "_blank");
  43.     window.open(szURL, "_blank", "toolbar=no, menubar=no, location=no, directories=no, resizable=yes, scrollbars=yes");
  44. }
  45.  
  46. function NisEvtEventOnLoad()
  47. {
  48.     // Determine the product ID.
  49.     
  50.     var WrapUM = new ActiveXObject("WrapUM.WrapNISUM");
  51.     ProdType = WrapUM.ProductType;
  52.     delete WrapUM;
  53.  
  54.     // If the product is NPF, SDF, or SCF, hide the user row.
  55.  
  56.     switch(ProdType)
  57.     {
  58.     case "PT_NPF":
  59.     case "PT_SDF":
  60.     case "PT_SCF":
  61.         UserRow.style.display = "none";
  62.         break;
  63.  
  64.     default:
  65.         break;
  66.     }
  67. }
  68.  
  69. function IDSEventOnLoad()
  70. {
  71.     // Determine the product ID.
  72.     
  73.     var WrapUM = new ActiveXObject("WrapUM.WrapNISUM");
  74.     ProdType = WrapUM.ProductType;
  75.     delete WrapUM;
  76.  
  77.     // If the product is SDF or SCF, hide all BackTrace features.
  78.  
  79.     switch(ProdType)
  80.     {
  81.     case "PT_SDF":
  82.     case "PT_SCF":
  83.         {
  84.             // Hide the BackTrace description row if it exists.
  85.  
  86.             if (BTDescriptionRow != null)
  87.                 BTDescriptionRow.style.display = "none";
  88.  
  89.             // Change all BackTrace links to normal text.
  90.  
  91.             if (BTLink.length)
  92.             {
  93.                 for (i = 0; i < BTLink.length; i++)
  94.                 {
  95.                     BTLink[i].className = "";
  96.                 }
  97.             }
  98.             else
  99.                 BTLink.className = "";
  100.  
  101.             // Turn off all BackTrace link onclick handler.
  102.  
  103.             bEnableBT = false;
  104.         }
  105.         break;
  106.  
  107.     default:
  108.         break;
  109.     }
  110. }
  111.