home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 November / Chip_2003-11_cd2.bin / nav2004 / download / NAV / External / NORTON / APP / NAVComUI.dll / HTML / QUICKSUMMARY.JS < prev    next >
Text File  |  2003-08-17  |  6KB  |  201 lines

  1. // 
  2. // Local Variable
  3. //
  4. var CommonUI;
  5. var NAVLnch;
  6. var MainFrame = window.parent;
  7. var RoadmapFrame = window.parent.frames("contents");
  8. var Detected = 0;
  9.  
  10. function OnRenewButton()
  11. {
  12.     try
  13.     {
  14.         // Launch the wizard
  15.         NAVLnch.LaunchSubscriptionWizard();
  16.     }
  17.     catch(err)
  18.     {
  19.         NAVLnch.NAVError.LogAndDisplay(0);
  20.     }
  21.     
  22.     // Re-check if the subscription is still expired or not
  23.     IsSubscriptionExpired();
  24. }
  25.  
  26. function IsSubscriptionExpired()
  27. {   
  28.     try
  29.     {
  30.         // Get subscription expired
  31.         var bExpired = CommonUI.VirusDefSubscriptionExpired;
  32.         
  33.         // Show the expired text if expired
  34.         if(bExpired)
  35.         {           
  36.             RenewSubscritpionDashline.style.display="";
  37.             BottomTextData.height="35";
  38.             
  39.             try
  40.             {
  41.                 if(NAVLicense.CanRenewSubscription)
  42.                 {
  43.                     RenewSubscritpion.style.display="";
  44.                     AdminRights.style.display="none";
  45.                 }
  46.                 else
  47.                 {
  48.                     RenewSubscritpion.style.display="none";
  49.                     AdminRights.style.display="";
  50.                 }                
  51.             }
  52.             catch(err)
  53.             {
  54.             }
  55.         }
  56.         else
  57.         {
  58.             RenewSubscritpionDashline.style.display="none";
  59.             RenewSubscritpion.style.display="none";
  60.             BottomTextData.height="78";
  61.         }        
  62.     }
  63.     catch(err)
  64.     {
  65.     }
  66. }
  67.  
  68. function OnLoad()
  69. {
  70.     CommonUI = window.external.ObjectArg;
  71.     
  72.     try
  73.     {
  74.         // Create a NAV Launch object
  75.         NAVLnch = new ActiveXObject("Symantec.Norton.AntiVirus.AppLauncher");
  76.     }
  77.     catch(err)
  78.     {
  79.     }
  80.     
  81.     try
  82.     {
  83.         NAVLicense = new ActiveXObject("NAVLicense.NAVLicenseInfo");
  84.     }
  85.     catch(err)
  86.     {
  87.     }
  88.     
  89.     var bCheckSub = true;
  90.     try
  91.     {
  92.         bCheckSub = NAVLicense.ShouldCheckSubscription;
  93.     }
  94.     catch(err)
  95.     {
  96.     }
  97.     
  98.     Finished.focus();
  99.     
  100.     // Update the summary page
  101.  
  102.     // If subscritption is expired show the renew information
  103.     if(bCheckSub)
  104.     {
  105.         IsSubscriptionExpired();
  106.     }
  107.     
  108.     // Scan statistics
  109.     RoadmapFrame.g_nTotalItemScanned = CommonUI.ItemScanned;
  110.     Detected = RoadmapFrame.g_nTotalThreatsDetected + RoadmapFrame.g_nTotalItemInfected;
  111.     RoadmapFrame.g_nTotalMBRScanned = CommonUI.MBRScanned;
  112.     RoadmapFrame.g_nTotalMBRInfected = CommonUI.MBRInfected;
  113.     RoadmapFrame.g_nTotalMBRRepaired = CommonUI.MBRRepaired;
  114.     RoadmapFrame.g_nTotalBRScanned = CommonUI.BRScanned;
  115.     RoadmapFrame.g_nTotalBRInfected = CommonUI.BRInfected;
  116.     RoadmapFrame.g_nTotalBRRepaired = CommonUI.BRRepaired;
  117.     
  118.     if (RoadmapFrame.g_nTotalItemInfected > 0 || RoadmapFrame.g_nTotalThreatsDetected > 0)
  119.     {
  120.         // Infection found
  121.         InfectionFound.style.display = "";    
  122.         NoInfectionFound.style.display = "none";
  123.     }
  124.     else
  125.     {
  126.         // No infection found
  127.         InfectionFound.style.display = "none";    
  128.         NoInfectionFound.style.display = "";
  129.     }
  130.     
  131.     // Check if this is from Email Scanning
  132.     if (RoadmapFrame.g_bEmailScanning == true)
  133.     {
  134.         EmailInfection.style.display = "";
  135.     }
  136.  
  137.     ScanFileCount.innerHTML = RoadmapFrame.g_nTotalItemScanned;
  138.     ScanMBRCount.innerHTML = RoadmapFrame.g_nTotalMBRScanned;
  139.     ScanBRCount.innerHTML = RoadmapFrame.g_nTotalBRScanned;
  140.     InfectedFileCount.innerHTML = Detected - RoadmapFrame.g_nTotalMBRInfected - RoadmapFrame.g_nTotalBRInfected;
  141.     InfectedMBRCount.innerHTML = RoadmapFrame.g_nTotalMBRInfected;
  142.     InfectedBRCount.innerHTML = RoadmapFrame.g_nTotalBRInfected;    
  143.     RepairedFileCount.innerHTML = RoadmapFrame.g_nTotalItemRepaired - RoadmapFrame.g_nTotalMBRRepaired - RoadmapFrame.g_nTotalBRRepaired; 
  144.     RepairedMBRCount.innerHTML = RoadmapFrame.g_nTotalMBRRepaired;
  145.     RepairedBRCount.innerHTML = RoadmapFrame.g_nTotalBRRepaired;
  146.     QuaratinedFileCount.innerHTML = RoadmapFrame.g_nTotalItemQuarantined;
  147.     DeletedFileCount.innerHTML = RoadmapFrame.g_nTotalItemDeleted + RoadmapFrame.g_nTotalThreatsDeleted;
  148.     ExcludedFileCount.innerHTML = RoadmapFrame.g_nTotalThreatsExcluded;
  149.  
  150.     RoadmapFrame.g_nRemainingInfection = Detected - RoadmapFrame.g_nTotalItemRepaired - RoadmapFrame.g_nTotalItemQuarantined - RoadmapFrame.g_nTotalItemDeleted - RoadmapFrame.g_nTotalThreatsDetected;
  151.     RoadmapFrame.g_nRemainingThreats = RoadmapFrame.g_nTotalThreatsDetected - RoadmapFrame.g_nTotalThreatsExcluded - RoadmapFrame.g_nTotalThreatsDeleted;
  152.     
  153.     if ( Number(RoadmapFrame.g_nRemainingInfection) > 0 )
  154.     {
  155.         InfectionRemainingCount.innerHTML = RoadmapFrame.g_nRemainingInfection;
  156.         InfectionRemainingText.style.display = "";
  157.         InfectionRemainingCount.style.display = "";
  158.         InfectionRemainingText2.style.display = "";
  159.         
  160.         // Add the threat cat info if necessary
  161.         if( RoadmapFrame.g_bThreatCatEnabled == true && Number(RoadmapFrame.g_nRemainingThreats) > 0 )
  162.         {
  163.             ThreatRemainingCount.innerHTML = RoadmapFrame.g_nRemainingThreats;
  164.             ThreatRemainingTextConjunction.style.display = "";
  165.             ThreatRemainingCount.style.display = "";
  166.             ThreatRemainingText2.style.display = "";
  167.         }
  168.         else
  169.         {
  170.             InfectionPeriod.style.display = "";
  171.         }
  172.     }
  173.     // Only non-viral threats remain, just show threat cat info
  174.     else if( RoadmapFrame.g_bThreatCatEnabled == true && Number(RoadmapFrame.g_nRemainingThreats) > 0)
  175.     {
  176.         ThreatRemainingCount.innerHTML = RoadmapFrame.g_nRemainingThreats;
  177.         InfectionRemainingText.style.display = "";
  178.         ThreatRemainingCount.style.display = "";
  179.         ThreatRemainingText2.style.display = "";
  180.     }
  181. }
  182.  
  183. function OnMoreDetails()
  184. {
  185.     window.parent.frames("contents").OnNextButton();
  186. }
  187.  
  188. function OnKeyPress()
  189. {
  190.     // Launch moreinfo from the keyboard.
  191.     // The "SPACEBAR" and "ENTER" keys are used.
  192.     if ( (event.keyCode == SPACEBAR_KEY) || (event.keyCode == ENTER_KEY) )
  193.     {
  194.         CommonUI.Help(11584);
  195.     }
  196. }
  197.  
  198. function OnFinishedButton()
  199. {
  200.     RoadmapFrame.OnCancelButton();
  201. }