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

  1. //
  2. // Global variables
  3. //
  4. var g_nRemainingInfection = 0;
  5. var g_nTotalItemRepaired = 0;
  6. var g_nTotalItemRepairDeleted = 0;
  7. var g_nTotalItemQuarantined = 0;
  8. var g_nTotalItemDeleted = 0;
  9. var g_nTotalItemScanned = 0;
  10. var g_nTotalItemInfected = 0;
  11. var g_nTotalMBRScanned = 0;
  12. var g_nTotalMBRInfected = 0;
  13. var g_nTotalMBRRepaired = 0;
  14. var g_nTotalBRScanned = 0;
  15. var g_nTotalBRInfected = 0;
  16. var g_nTotalBRRepaired = 0;
  17. var g_bEmailScanning = false;
  18. var g_bThreatCatEnabled = false;
  19.  
  20. //
  21. // Added for THREAT CATEGORIZATION
  22. //
  23. var g_nTotalThreatsDetected = 0;
  24. var g_nTotalThreatsDeleted = 0;
  25. var g_nTotalThreatsExcluded = 0;
  26. var g_nRemainingThreats = 0;
  27.  
  28. var MainFrame = window.parent;
  29.  
  30. MainFrame.m_nCurrentPanel = 0; 
  31. MainFrame.m_nMaxPanels = 4;        
  32. MainFrame.m_aWizardPanels = new Array(MainFrame.m_nMaxPanels);
  33. MainFrame.g_bRoadmapLoaded = false;
  34.  
  35. // somthing like a union
  36. var nScanProgPanel        = 0;
  37. var nRepairWizardPanel    = 1;
  38. var nQuickSummaryPanel    = 2;
  39. var nDetailSummaryPanel    = 3;
  40.  
  41. var    RepairBackground;
  42. var    QuarantineBackground;
  43. var    DeleteBackground;
  44.  
  45. function WizardPanel(TitleID, CategoryID, sTitle, htm)
  46. {
  47.     this.m_TitleID = TitleID;
  48.     this.m_CategoryID = CategoryID;    
  49.     this.m_sTitle = sTitle;
  50.     this.m_htm = htm;
  51.     this.m_bDisplayPanel = true;    
  52. }
  53.  
  54. function OnLoad()
  55. {
  56.     // Initialize global variables
  57.     MainFrame.m_aWizardPanels[nScanProgPanel] = new WizardPanel(ScanProgCat, null, "Scan Progress", "ScanProg.htm"); 
  58.     MainFrame.m_aWizardPanels[nRepairWizardPanel] = new WizardPanel(RepairWizCat, null, "Repair Wizard", "RepairWizard.htm");
  59.     MainFrame.m_aWizardPanels[nQuickSummaryPanel] = new WizardPanel(SummaryCat, null, "Quick Summary", "QuickSummary.htm");
  60.     MainFrame.m_aWizardPanels[nDetailSummaryPanel] = new WizardPanel(SummaryCat, null, "Detail Summary", "DetailSummary.htm");
  61.     MainFrame.g_bRoadmapLoaded = true;
  62.  
  63.     g_nTotalFileRepaired = 0;    
  64.     g_nTotalFileQuarantined = 0;
  65.     g_nTotalFileDeleted = 0;
  66.     
  67.     // THREAT CATEGORIZATION
  68.     g_nTotalThreatsDeleted = 0;
  69.     g_nTotalThreatsExcluded = 0;
  70.     
  71.     // Show the exlude panel if threat categorization is enabled and it's not an email scan
  72.     if( window.external.ObjectArg.ScanNonViralThreats && !window.external.ObjectArg.EmailDescription)
  73.         DisplayExcludeRow(true);
  74.     else
  75.         DisplayExcludeRow(false);
  76.     
  77.     // Initialize local variables    
  78.     RepairBackground = RepairCat.style.backgroundImage;
  79.     QuarantineBackground = QuarantineCat.style.backgroundImage;
  80.     DeleteBackground = DeleteCat.style.backgroundImage;    
  81. }
  82.  
  83. function OnUnload()
  84. {
  85.     // Delete all the Wizard Panel objects 
  86.  
  87.     for (i = 0; i < MainFrame.m_nMaxPanels; i++)
  88.     {
  89.         delete MainFrame.m_aWizardPanels[i];
  90.     }
  91. }
  92.  
  93. function ScanProgressTitle(bShow)
  94. {
  95.     MainFrame.m_nCurrentPanel = nScanProgPanel;
  96.     
  97.     if (bShow == true)
  98.     {
  99.         MainFrame.m_aWizardPanels[nScanProgPanel].m_TitleID.style.backgroundImage = 'url(Current.gif)';    
  100.     }
  101.     else
  102.     {
  103.         MainFrame.m_aWizardPanels[nScanProgPanel].m_TitleID.style.backgroundImage = '';
  104.     }
  105. }
  106.  
  107. function RepairWizardTitle(bShow)
  108. {
  109.     MainFrame.m_nCurrentPanel = nRepairWizardPanel;
  110.     
  111.     if (bShow == true)
  112.     {
  113.         MainFrame.m_aWizardPanels[nRepairWizardPanel].m_TitleID.style.backgroundImage = 'url(Current.gif)';    
  114.     }
  115.     else
  116.     {
  117.         MainFrame.m_aWizardPanels[nRepairWizardPanel].m_TitleID.style.backgroundImage = '';
  118.     }    
  119. }
  120.  
  121. function RepairTitle(bShow)
  122. {
  123.     if (bShow == true)
  124.     {
  125.         RepairCat.style.backgroundImage = 'url(CurrentWiz.gif)';
  126.         RepairArrow.style.display = "";
  127.     }
  128.     else
  129.     {
  130.         RepairCat.style.backgroundImage = '';
  131.         RepairArrow.style.display = "none";
  132.     }
  133. }
  134.  
  135. function QuarantineTitle(bShow)
  136. {
  137.     if (bShow == true)
  138.     {
  139.         QuarantineCat.style.backgroundImage = 'url(CurrentWiz.gif)';
  140.         QuarantineArrow.style.display = "";
  141.     }
  142.     else
  143.     {
  144.         QuarantineCat.style.backgroundImage = '';
  145.         QuarantineArrow.style.display = "none";
  146.     }
  147. }
  148.  
  149. function DeleteTitle(bShow)
  150. {
  151.     if (bShow == true)
  152.     {
  153.         DeleteCat.style.backgroundImage = 'url(CurrentWiz.gif)';
  154.         DeleteArrow.style.display = "";
  155.     }
  156.     else
  157.     {
  158.         DeleteCat.style.backgroundImage = '';
  159.         DeleteArrow.style.display = "none";        
  160.     }
  161. }
  162.  
  163. function ThreatExcludeTitle(bShow)
  164. {
  165.     if (bShow == true)
  166.     {
  167.         Threat_ExcludeCat.style.backgroundImage = 'url(CurrentWiz.gif)';
  168.         Threat_ExcludeArrow.style.display = "";
  169.     }
  170.     else
  171.     {
  172.         Threat_ExcludeCat.style.backgroundImage = '';
  173.         Threat_ExcludeArrow.style.display = "none";        
  174.     }
  175. }
  176.  
  177. function SummaryTitle(bShow)
  178. {
  179.     MainFrame.m_nCurrentPanel = nQuickSummaryPanel;
  180.     
  181.     if (bShow == true)
  182.     {
  183.         MainFrame.m_aWizardPanels[nQuickSummaryPanel].m_TitleID.style.backgroundImage = 'url(Current.gif)';    
  184.     }
  185.     else
  186.     {
  187.         MainFrame.m_aWizardPanels[nQuickSummaryPanel].m_TitleID.style.backgroundImage = '';
  188.     }
  189. }
  190.  
  191. function OnNextButton()
  192. {
  193.     var nNextPanel = MainFrame.m_nCurrentPanel + 1;
  194.  
  195.     for (; nNextPanel < MainFrame.m_nMaxPanels; nNextPanel++)
  196.     {
  197.         if (MainFrame.m_aWizardPanels[nNextPanel].m_bDisplayPanel == false)
  198.         {
  199.             continue;
  200.         }
  201.         break;
  202.     }
  203.  
  204.     LoadPage(nNextPanel);
  205. }
  206.  
  207. function OnBackButton()
  208. {
  209.     var nPrevPanel = MainFrame.m_nCurrentPanel - 1;
  210.  
  211.     for (; nPrevPanel >= 0; nPrevPanel--)
  212.     {
  213.         if (MainFrame.m_aWizardPanels[nPrevPanel].m_bDisplayPage == false)
  214.         {
  215.             continue;
  216.         }
  217.         break;
  218.     }
  219.         
  220.     LoadPage(nPrevPanel);
  221. }
  222.  
  223. function LoadPage(nPanel)
  224. {
  225.     if (nPanel > MainFrame.m_nMaxPanels - 1  || nPanel < 0)
  226.     {
  227.         return;
  228.     }
  229.  
  230.     if (MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_TitleID != null)
  231.     {
  232.         MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_TitleID.style.backgroundImage = '';
  233.     }
  234.     
  235.     MainFrame.m_nCurrentPanel = nPanel;
  236.     
  237.     if (MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_TitleID != null)
  238.     {
  239.         MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_TitleID.style.backgroundImage = 'url(Current.gif)';
  240.     }
  241.     
  242.     // Load the page into the "main" frame
  243.     MainFrame.frames("main").navigate(MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_htm);
  244. }
  245.  
  246. function OnCancelButton()
  247. {
  248.     if (g_nRemainingInfection > 0)
  249.     {
  250.         // Make sure it's not from Email Scanning.
  251.  
  252.         if (g_bEmailScanning != true)
  253.         {
  254.             webWnd.MsgBox(InfectionRemaininWarning.innerHTML, ProductName.innerHTML, MB_OK | MB_ICONWARNING);
  255.         }
  256.     }
  257.     
  258.     // Close the window
  259.     MainFrame.navigate("res://closeme.xyz");    
  260. }
  261.  
  262. function DisplayExcludeRow(bShow)
  263. {
  264.     if( bShow == true )
  265.     {
  266.         ExcludeRow.style.display = "";
  267.         table2_spacerimg1.height = 26;
  268.     }
  269.     else
  270.     {
  271.         ExcludeRow.style.display = "none";
  272.         table2_spacerimg1.height = 90;
  273.     }
  274. }