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

  1. var CommonUI;
  2. var REPAIR_PAGE = 1;
  3. var QUARANTINE_PAGE = 2;
  4. var DELETE_PAGE = 3;
  5. var THREAT_EXCLUDE_PAGE = 4;
  6. var CurrentPage;
  7. var iTotalInfection;
  8. var    MainFrame = window.parent;
  9. var RoadmapFrame = window.parent.frames("contents");
  10. var RepairBackground;
  11. var QuarantineBackground;
  12. var DeleteBackground;
  13. var TimerID = null;
  14. var ShowRepairProgress = true;
  15. var bAttemptedThreatDelete = false;
  16.  
  17. function OnLoad()
  18. {
  19.     // Get the CommonUI object from the dialog parameter
  20.     CommonUI = window.external.ObjectArg;
  21.     
  22.     ShowRepairProgress = CommonUI.RepairProgress;
  23.     
  24.     AxListCtrl.RepairProgress = ShowRepairProgress;
  25.     
  26.     // Initialize the ListViewCtrl
  27.     AxListCtrl.ScanResults = CommonUI.ScanResults;
  28.  
  29.     // Set the current page to repair 
  30.     CurrentPage = REPAIR_PAGE;
  31.     
  32.     TimerID = setInterval("Initialize()", 1);
  33. }
  34.  
  35. function OnUnload()
  36. {
  37.     AxListCtrl.StopRepair = true;
  38. }
  39.  
  40. function Initialize()
  41. {
  42.     // Check if the Roadmap frame is loaded
  43.     if (MainFrame.g_bRoadmapLoaded != true)
  44.         return;
  45.         
  46.     // Show the cancel button
  47.     RoadmapFrame.CancelButton_Cell.style.display = "";
  48.  
  49.     RoadmapFrame.RepairWizardTitle(true);
  50.     
  51.     // Get the total number of virus infection(s)
  52.     RoadmapFrame.g_nTotalItemInfected = AxListCtrl.TotalInfection;
  53.     
  54.     // Get if threat categorization is enabled
  55.     RoadmapFrame.g_bThreatCatEnabled = CommonUI.ScanNonViralThreats;
  56.  
  57.     // THREAT CATEGORIZATION
  58.     // Get the total number of threat(s) detected, deleted, Excluded
  59.     // If threat cat is off set all of these to 0
  60.     if( RoadmapFrame.g_bThreatCatEnabled == true )
  61.     {
  62.         RoadmapFrame.g_nTotalThreatsDetected = AxListCtrl.TotalThreats;
  63.         RoadmapFrame.g_nTotalThreatsDeleted = AxListCtrl.DeletedThreatCount;
  64.         RoadmapFrame.g_nTotalThreatsExcluded = AxListCtrl.ExcludedThreatCount;
  65.         RoadmapFrame.g_nRemainingThreats = RoadmapFrame.g_nTotalThreatsDetected - RoadmapFrame.g_nTotalThreatsDeleted - RoadmapFrame.g_nTotalThreatsExcluded;
  66.     }
  67.     else
  68.     {
  69.         RoadmapFrame.g_nTotalThreatsDetected = 0;
  70.         RoadmapFrame.g_nTotalThreatsDeleted = 0;
  71.         RoadmapFrame.g_nTotalThreatsExcluded = 0;
  72.         RoadmapFrame.g_nRemainingThreats = 0;
  73.     }
  74.  
  75.     // Get the total number of repaired infection(s)
  76.     RoadmapFrame.g_nTotalItemRepaired = AxListCtrl.RepairedInfectionCount;
  77.  
  78.     // Get the total number of repair deleted infection(s)
  79.     RoadmapFrame.g_nTotalItemRepairDeleted = AxListCtrl.RepairDeletedInfectionCount;
  80.  
  81.     // Get the total number of quarantined infection(s)
  82.     RoadmapFrame.g_nTotalItemQuarantined = AxListCtrl.QuarantinedInfectionCount;
  83.  
  84.     // Get the total number of deleted infection(s)
  85.     RoadmapFrame.g_nTotalItemDeleted = AxListCtrl.DeletedInfectionCount - RoadmapFrame.g_nTotalItemQuarantined;
  86.  
  87.     // Get the total number of remaining infection(s)
  88.     RoadmapFrame.g_nRemainingInfection = RoadmapFrame.g_nTotalItemInfected - RoadmapFrame.g_nTotalItemRepaired - RoadmapFrame.g_nTotalItemQuarantined - RoadmapFrame.g_nTotalItemDeleted;
  89.     
  90.     // Check if we need to set the email description fields
  91.     RoadmapFrame.g_bEmailScanning = CommonUI.EmailDescription;
  92.  
  93.     if (RoadmapFrame.g_bEmailScanning == true)
  94.     {
  95.         // Inform the ListVeiwCtrl this is an email scan
  96.         AxListCtrl.EmailScanning = true;
  97.         
  98.         // Show the email description fields
  99.         EmailText.style.display = "";
  100.         
  101.         // Hide the Infection information field
  102.         InfectionText.style.display = "none";
  103.         
  104.         // Update the infection count
  105.         EmailInfectionCount.innerHTML = RoadmapFrame.g_nTotalItemInfected;
  106.     
  107.         // Update the subject info
  108.         RoadmapFrame.EmailSubject.innerText = RoadmapFrame.EmailSubject.innerText + CommonUI.EmailSubject;
  109.     
  110.         // Update the sender info
  111.         RoadmapFrame.EmailSender.innerText = RoadmapFrame.EmailSender.innerText + CommonUI.EmailSender;
  112.     
  113.         // Update the recipient info
  114.         RoadmapFrame.EmailRecipient.innerText = RoadmapFrame.EmailRecipient.innerText + CommonUI.EmailRecipient;
  115.         
  116.         // If threat cat is enabled update the fields
  117.         if( RoadmapFrame.g_bThreatCatEnabled == true )
  118.         {
  119.             // Update the threat count
  120.             EmailNonViralThreatCount.innerHTML = RoadmapFrame.g_nTotalThreatsDetected;
  121.             
  122.             // Show the email text
  123.             EmailThreatConjunction.style.display = "";
  124.             EmailNonViralThreatCount.style.display = "";
  125.             EmailNonViralThreatDescriptionExt.style.display = "";
  126.         }
  127.     }
  128.     else
  129.     {
  130.         // Update the infection count
  131.         InfectionCount.innerHTML = RoadmapFrame.g_nTotalItemInfected;
  132.     }
  133.  
  134.     if( RoadmapFrame.g_bThreatCatEnabled == true )
  135.         bAttemptedThreatDelete = AxListCtrl.AttemptedThreatDelete;
  136.     
  137.     // Check if we already attempted delete (and the deleted infections are not repair-deletes).
  138.     if (AxListCtrl.AttemptedDelete == true &&
  139.        ((RoadmapFrame.g_nTotalItemDeleted != RoadmapFrame.g_nTotalItemRepairDeleted || RoadmapFrame.g_nTotalItemDeleted == 0) ||
  140.         (RoadmapFrame.g_nTotalItemDeleted == RoadmapFrame.g_nTotalItemInfected)))
  141.     {
  142.         // Go to Summary if we already attempted delete and there are no remaining threats
  143.         if( RoadmapFrame.g_nRemainingThreats == 0 )
  144.             GoToSummary();
  145.             
  146.         // If there are remaining threats go to the next page
  147.         else if( bAttemptedThreatDelete == true )
  148.         {
  149.             DisplayRepair(false);
  150.             DisplayThreatExclude(true);
  151.         }
  152.         else // Go to the delete page to delete the remaining threats
  153.         {
  154.             DisplayRepair(false);
  155.             DisplayDelete(true);
  156.         }
  157.     }
  158.     else if (AxListCtrl.AttemptedRepair == true)
  159.     {
  160.         // If we repaired all the infection(s) and there are no remaing non-viral threat items, go to the Summary Page
  161.         if ((RoadmapFrame.g_nTotalItemRepaired + RoadmapFrame.g_nTotalItemRepairDeleted - CommonUI.MBRRepaired - CommonUI.BRRepaired) == (RoadmapFrame.g_nTotalItemInfected - CommonUI.MBRInfected - CommonUI.BRInfected))
  162.         {
  163.             if( RoadmapFrame.g_nRemainingThreats == 0 )
  164.                 GoToSummary();
  165.             else if( bAttemptedThreatDelete == true ) //Already attempted delete: Go to the exclude page
  166.             {
  167.                 DisplayRepair(false);
  168.                 DisplayThreatExclude(true);
  169.             }
  170.             else // Go to the delete page to delete remaining threats
  171.             {
  172.                 DisplayRepair(false);
  173.                 DisplayDelete(true);
  174.             }
  175.         }
  176.         else if (AxListCtrl.AttemptedQuarantine == true)
  177.         {
  178.             // If we repaired and quarantined all the infection(s) and no threats remain
  179.             // go to the summary panel
  180.             if ((RoadmapFrame.g_nTotalItemRepaired + RoadmapFrame.g_nTotalItemRepairDeleted + RoadmapFrame.g_nTotalItemQuarantined - CommonUI.MBRRepaired - CommonUI.BRRepaired) == (RoadmapFrame.g_nTotalItemInfected - CommonUI.MBRInfected - CommonUI.BRInfected))
  181.             {
  182.                 if(  RoadmapFrame.g_nRemainingThreats == 0 )
  183.                 {
  184.                     GoToSummary();
  185.                 }
  186.                 // If there are remaining threats and we have already attempted delete, go to the
  187.                 // Exclude page
  188.                 else if( bAttemptedThreatDelete == true )
  189.                 {
  190.                     DisplayRepair(false);
  191.                     DisplayThreatExclude(true);
  192.                 }
  193.                 else // Go to the delete page to delete remaining threats
  194.                 {
  195.                     DisplayRepair(false);
  196.                     DisplayDelete(true);
  197.                 }
  198.             }
  199.             else
  200.             {
  201.                 // Move to Delete page since we have already repaired
  202.                 // and quarantined some infections (this is the case 
  203.                 // if options is set to auto repair & quarantine)
  204.                 DisplayRepair(false);
  205.                 DisplayDelete(true);
  206.             }
  207.         }
  208.         else
  209.         {
  210.             // Move to Quarantine page since we have already repaired
  211.             // some infections (this is the case if options is set to
  212.             // auto repair)
  213.             DisplayRepair(false);
  214.             DisplayQuarantine(true);
  215.         }
  216.     }
  217.     else if( RoadmapFrame.g_nRemainingInfection != 0 )
  218.     {
  219.         // Go to the repair page
  220.         DisplayRepair(true);
  221.     }
  222.     else if( RoadmapFrame.g_nRemainingThreats != 0 )
  223.     {
  224.         // Go to the delete page to handle the remaining threats if a delete has not been attempted
  225.         if( bAttemptedThreatDelete == true )
  226.         {
  227.             DisplayRepair(false);
  228.             DisplayThreatExclude(true);
  229.         }
  230.         else
  231.         {
  232.             DisplayRepair(false);
  233.             DisplayDelete(true);
  234.         }
  235.     }
  236.     else
  237.         GoToSummary();
  238.     
  239.     // Kill the timer    
  240.     clearInterval(TimerID);
  241. }
  242.  
  243. function OnRepair()
  244. {
  245.     if (AxListCtrl.ItemsSelected == 0)
  246.     {
  247.         RoadmapFrame.webWnd.MsgBox(NoItemSelected.innerHTML, RoadmapFrame.ProductName.innerHTML, MB_OK);
  248.         return;        
  249.     }
  250.     
  251.     // Diable the Repair and Skip button
  252.     Repair.disabled= true;
  253.     Skip1.disabled = true;
  254.     RoadmapFrame.CancelButton.disabled = true;
  255.  
  256.     if (ShowRepairProgress == true)
  257.     {
  258.         SetProgress(0);
  259.         ProgressBar.style.display = "";
  260.     
  261.         // Repair the checked items
  262.         AxListCtrl.Repair();
  263.     }
  264.     else
  265.     {
  266.         // Repair the checked items
  267.         AxListCtrl.Repair();
  268.         NextPage(CurrentPage);
  269.     }
  270. }
  271.  
  272. function OnQuarantine()
  273. {
  274.     if (AxListCtrl.ItemsSelected == 0)
  275.     {
  276.         RoadmapFrame.webWnd.MsgBox(NoItemSelected.innerHTML, RoadmapFrame.ProductName.innerHTML, MB_OK);
  277.         return;        
  278.     }
  279.  
  280.     // Disable the Quarantine and Skip button
  281.     Quarantine.disabled= true;
  282.     Skip2.disabled = true;
  283.     RoadmapFrame.CancelButton.disabled = true;    
  284.  
  285.     if (ShowRepairProgress == true)
  286.     {
  287.         SetProgress(0);
  288.         ProgressBar.style.display = "";    
  289.  
  290.         // Quarantine the checked items
  291.         AxListCtrl.Quarantine();
  292.     }
  293.     else
  294.     {
  295.         // Quarantine the checked items
  296.         AxListCtrl.Quarantine();
  297.         NextPage(CurrentPage);
  298.     }
  299. }
  300.  
  301. function OnDelete()
  302. {
  303.     if (AxListCtrl.ItemsSelected == 0)
  304.     {
  305.         RoadmapFrame.webWnd.MsgBox(NoItemSelected.innerHTML, RoadmapFrame.ProductName.innerHTML, MB_OK);
  306.         return;
  307.     }
  308.  
  309.     // If threat categorization is enabled, there are remaining threats, and
  310.     // at least one threat item is selected, tell the user that deleted threats 
  311.     // will be backed up in quarantine
  312.     var MsgToDisplay = DeleteWarning.innerHTML;
  313.     if (RoadmapFrame.g_bEmailScanning == true)
  314.         MsgToDisplay = EmailDeleteWarning.innerHTML;
  315.     if( RoadmapFrame.g_bThreatCatEnabled == true && AxListCtrl.BackupDeletedThreats == true && RoadmapFrame.g_nRemainingThreats > 0)
  316.     {
  317.         if (RoadmapFrame.g_bEmailScanning == true)
  318.             MsgToDisplay = EmailThreatDeleteWarning.innerHTML;
  319.         else
  320.             MsgToDisplay = ThreatDeleteWarning.innerHTML;
  321.     }
  322.     
  323.     iMsgBoxReturn = RoadmapFrame.webWnd.MsgBox(MsgToDisplay, RoadmapFrame.ProductName.innerHTML, MB_YESNO | MB_ICONWARNING);
  324.     
  325.     if (iMsgBoxReturn == IDYES)
  326.     {
  327.         // Disable the Delete and Skip button
  328.         Delete.disabled= true;
  329.         Skip3.disabled = true;
  330.         RoadmapFrame.CancelButton.disabled = true;
  331.  
  332.         if (ShowRepairProgress == true)
  333.         {
  334.             SetProgress(0);
  335.             ProgressBar.style.display = "";
  336.     
  337.             // Delete the checked items
  338.             AxListCtrl.Delete();
  339.         }
  340.         else
  341.         {
  342.             // Delete the checked items
  343.             AxListCtrl.Delete();
  344.             NextPage(CurrentPage);
  345.         }
  346.     }
  347. }
  348.  
  349. // THREAT CATEGORIZATION
  350. function OnExclude()
  351. {
  352.     // Add selected items to the threat exclusions
  353.     
  354.     // If some items are selected warn the user about the implications of excluding
  355.     var iMsgBoxReturn = IDYES;
  356.     if( AxListCtrl.ItemsSelected != 0 )
  357.     {
  358.         iMsgBoxReturn = RoadmapFrame.webWnd.MsgBox(ExcludeWarning.innerHTML, RoadmapFrame.ProductName.innerHTML, MB_YESNO | MB_ICONWARNING);
  359.     }
  360.     
  361.     if (iMsgBoxReturn == IDYES)
  362.     {
  363.         // Disable the Exclude and Skip button
  364.         Exclude.disabled = true;
  365.         Skip2.disabled = true;
  366.         RoadmapFrame.CancelButton.disabled = true;    
  367.  
  368.         if (ShowRepairProgress == true)
  369.         {
  370.             SetProgress(0);
  371.             ProgressBar.style.display = "";    
  372.  
  373.             // Exclude the checked items
  374.             AxListCtrl.Exclude();
  375.         }
  376.         else
  377.         {
  378.             // Exclude the checked items
  379.             AxListCtrl.Exclude();
  380.             NextPage(CurrentPage);
  381.         }
  382.     }
  383. }
  384.  
  385. function OnSkip()
  386. {
  387.     ShowNextPage(CurrentPage);
  388. }
  389.  
  390. function NextPage(nCurrentPage)
  391. {
  392.     if (nCurrentPage == REPAIR_PAGE)
  393.     {
  394.         // If threat cat is enabled there is the possibility that we have new items found
  395.         // so refresh our items
  396.         if( RoadmapFrame.g_bThreatCatEnabled )
  397.         {
  398.             RoadmapFrame.g_nTotalItemInfected = AxListCtrl.TotalInfection;
  399.             RoadmapFrame.g_nTotalThreatsDetected = AxListCtrl.TotalThreats;
  400.             RoadmapFrame.g_nTotalThreatsDeleted = AxListCtrl.DeletedThreatCount;
  401.             RoadmapFrame.g_nTotalThreatsExcluded = AxListCtrl.ExcludedThreatCount;
  402.             RoadmapFrame.g_nRemainingThreats = RoadmapFrame.g_nTotalThreatsDetected - RoadmapFrame.g_nTotalThreatsDeleted - RoadmapFrame.g_nTotalThreatsExcluded;
  403.         }
  404.         
  405.         // Get the total number of repaired infection(s)
  406.         RoadmapFrame.g_nTotalItemRepaired = AxListCtrl.RepairedInfectionCount;
  407.         RoadmapFrame.g_nTotalItemRepairDeleted = AxListCtrl.RepairDeletedInfectionCount;
  408.         RoadmapFrame.g_nTotalItemDeleted = AxListCtrl.DeletedInfectionCount - RoadmapFrame.g_nTotalItemQuarantined;
  409.  
  410.         if ((RoadmapFrame.g_nTotalItemInfected - CommonUI.MBRInfected - CommonUI.BRInfected) == (RoadmapFrame.g_nTotalItemRepaired + RoadmapFrame.g_nTotalItemRepairDeleted - CommonUI.MBRRepaired - CommonUI.BRRepaired))
  411.         {
  412.             // Jump to summary page since there are no infections as long as there are no non-viral threats
  413.             if( RoadmapFrame.g_nRemainingThreats == 0 )
  414.             {
  415.                 GoToSummary();
  416.             }
  417.             else if( bAttemptedThreatDelete == true )
  418.             {
  419.                 // Already attempted delete, go to exclude
  420.                 DisplayRepair(false);
  421.                 DisplayThreatExclude(true);
  422.             }
  423.             else
  424.             {
  425.                 // Go to delete
  426.                 DisplayRepair(false);
  427.                 DisplayDelete(true);
  428.             }
  429.         }
  430.         else
  431.         {
  432.             // There are infections remaining so go to the next page
  433.             ShowNextPage(nCurrentPage);
  434.         }
  435.     }
  436.     else if (nCurrentPage == QUARANTINE_PAGE)
  437.     {
  438.         // Get the total number of quarantined infection(s)
  439.         RoadmapFrame.g_nTotalItemQuarantined = AxListCtrl.QuarantinedInfectionCount;
  440.  
  441.         if ((RoadmapFrame.g_nTotalItemInfected - CommonUI.MBRInfected - CommonUI.BRInfected) == (RoadmapFrame.g_nTotalItemRepaired + RoadmapFrame.g_nTotalItemRepairDeleted + RoadmapFrame.g_nTotalItemQuarantined  - CommonUI.MBRRepaired - CommonUI.BRRepaired))
  442.         {
  443.             // Jump to summary page since there are no infections as long as there are no non-viral threats
  444.             if( RoadmapFrame.g_nRemainingThreats == 0 )
  445.             {
  446.                 GoToSummary();
  447.             }
  448.             // Non-viral threats remain
  449.             else if( bAttemptedThreatDelete == true )  // Already attempted delete go to exclude
  450.             {
  451.                 DisplayQuarantine(false);
  452.                 DisplayThreatExclude(true);
  453.             }
  454.             else // Go to delete page (next page)
  455.             {
  456.                 ShowNextPage(nCurrentPage);
  457.             }
  458.         }
  459.         else
  460.         {
  461.             // Change to the next page
  462.             ShowNextPage(nCurrentPage);
  463.         }
  464.     }
  465.     else if (nCurrentPage == DELETE_PAGE)
  466.     {
  467.         // Get the total number of deleted infection(s)
  468.         RoadmapFrame.g_nTotalItemDeleted = AxListCtrl.DeletedInfectionCount - RoadmapFrame.g_nTotalItemQuarantined;
  469.  
  470.         // Get threat categorization data if threat cat is enabled
  471.         if( RoadmapFrame.g_bThreatCatEnabled == true )
  472.         {
  473.             // Get the total number of deleted threat(s)
  474.             RoadmapFrame.g_nTotalThreatsDeleted = AxListCtrl.DeletedThreatCount;
  475.  
  476.             // Update the remaining threat count
  477.             RoadmapFrame.g_nRemainingThreats = RoadmapFrame.g_nTotalThreatsDetected - RoadmapFrame.g_nTotalThreatsDeleted;
  478.             
  479.             // Check for remaining threats
  480.             if (RoadmapFrame.g_nRemainingThreats == 0)
  481.             {
  482.                 // Jump to summary page since there are no threats to Exclude
  483.                 GoToSummary();
  484.             }
  485.             else
  486.             {
  487.                 // Change to the next page (Exclude Page)
  488.                 ShowNextPage(nCurrentPage);    
  489.             }
  490.         }
  491.         else // No threat cat - go to summary
  492.             GoToSummary();
  493.     }
  494.     else if (nCurrentPage == THREAT_EXCLUDE_PAGE)
  495.     {
  496.         // Get the total number of Excluded threats
  497.         RoadmapFrame.g_nTotalThreatsExcluded = AxListCtrl.ExcludedThreatCount;
  498.  
  499.         // Go to the summary page
  500.         GoToSummary();
  501.     }
  502. }
  503.  
  504. function ShowNextPage(nCurrentPage)
  505. {
  506.     switch (nCurrentPage)
  507.     {
  508.         case REPAIR_PAGE:
  509.         {
  510.             DisplayRepair(false);
  511.             DisplayQuarantine(true);
  512.             break;
  513.         }
  514.         case QUARANTINE_PAGE:
  515.         {
  516.             DisplayQuarantine(false);
  517.             DisplayDelete(true);
  518.             break;
  519.         }
  520.         case DELETE_PAGE:
  521.         {
  522.             DisplayDelete(false);
  523.                 DisplayThreatExclude(true);
  524.             break;
  525.         }
  526.         case THREAT_EXCLUDE_PAGE:
  527.         {
  528.             RoadmapFrame.ThreatExcludeTitle(false);
  529.             GoToSummary();
  530.             break;
  531.         }
  532.     }
  533. }
  534.  
  535. function GoToSummary()
  536. {
  537.     CloseTooltip();
  538.     RoadmapFrame.RepairTitle(false);
  539.     RoadmapFrame.QuarantineTitle(false);
  540.     RoadmapFrame.DeleteTitle(false);
  541.     RoadmapFrame.ThreatExcludeTitle(false);    
  542.  
  543.     // Hide the Canel button, since we already have a Finish button on the 
  544.     // Summary Page.
  545.     
  546.     RoadmapFrame.CancelButton.style.display = "none";
  547.     RoadmapFrame.OnNextButton();
  548. }
  549.  
  550. function DisplayRepair(bShow)
  551. {
  552.     if( bShow == true )
  553.     {
  554.         CloseTooltip();
  555.         CurrentPage = REPAIR_PAGE;
  556.         AxListCtrl.RepairWizardPage = CurrentPage;
  557.         
  558.         // Show the Repair subtitle
  559.         RepairSubTitle.style.display = "";
  560.         
  561.         // Show the Repair button
  562.         RepairRow.style.display = "";
  563.         
  564.         // Show the Show description 
  565.         RepairDescr.style.display = "";
  566.         
  567.         // Show the Infected Count
  568.         InfectionCount.innerHTML = RoadmapFrame.g_nTotalItemInfected;
  569.         
  570.         // If threat cat is enabled show threat info
  571.         DisplayThreatInfo(RoadmapFrame.g_bThreatCatEnabled);
  572.         
  573.         // Show the repair title
  574.         RoadmapFrame.RepairTitle(true);
  575.     }
  576.     else
  577.     {
  578.         // Hide the Repair subtitle
  579.         RepairSubTitle.style.display = "none";
  580.         
  581.         // Hide the Repair button
  582.         RepairRow.style.display = "none";
  583.         
  584.         // Hide the Show description 
  585.         RepairDescr.style.display = "none";
  586.         
  587.         // Hide the repair title
  588.         RoadmapFrame.RepairTitle(false);
  589.     }
  590. }
  591.  
  592. function DisplayQuarantine(bShow)
  593. {
  594.     if( bShow == true )
  595.     {
  596.         CloseTooltip();
  597.         CurrentPage = QUARANTINE_PAGE;
  598.         AxListCtrl.RepairWizardPage = CurrentPage;
  599.         
  600.         // Show the Quarantine subtitle
  601.         QuarantineSubTitle.style.display = "";
  602.         
  603.         // Show the Quarantine button
  604.         QuarantineRow.style.display = "";
  605.         
  606.         // Show the Quarantine description 
  607.         QuarantineDescr.style.display = "";
  608.         
  609.         // Show the Repair Count
  610.         RepairText.style.display = "";
  611.         RepairedCount.innerHTML = RoadmapFrame.g_nTotalItemRepaired + RoadmapFrame.g_nTotalItemRepairDeleted;
  612.         
  613.         // Show the title
  614.         RoadmapFrame.QuarantineTitle(true);
  615.         
  616.         // Set focus to the quarantine button
  617.         Quarantine.focus();
  618.         
  619.         // If threat cat is enabled show threat info
  620.         DisplayThreatInfo(RoadmapFrame.g_bThreatCatEnabled);
  621.     }
  622.     else
  623.     {
  624.         // Hide the Quarantine subtitle
  625.         QuarantineSubTitle.style.display = "none";
  626.         
  627.         // Hide the Quarantine button
  628.         QuarantineRow.style.display = "none";
  629.         
  630.         // Hide the Quarantine description 
  631.         QuarantineDescr.style.display = "none";
  632.         
  633.         // Hide the title
  634.         RoadmapFrame.QuarantineTitle(false);
  635.     }
  636. }
  637.  
  638. function DisplayDelete(bShow)
  639. {
  640.     if( bShow == true )
  641.     {
  642.         CloseTooltip();
  643.         CurrentPage = DELETE_PAGE;
  644.         AxListCtrl.RepairWizardPage = CurrentPage;
  645.         
  646.         // Show the Delete subtitle
  647.         DeleteSubTitle.style.display = "";
  648.         
  649.         // Show the Quarantine count
  650.         QuarantineText.style.display = "";
  651.         QuarantinedCount.innerHTML = RoadmapFrame.g_nTotalItemQuarantined;
  652.         
  653.         // Show the Delete button
  654.         DeleteRow.style.display = "";
  655.         
  656.         // Show the Delete description
  657.         DeleteDescr.style.display = "";
  658.         
  659.         // Show the Delete title
  660.         RoadmapFrame.DeleteTitle(true);
  661.         
  662.         // Set focus to the delete button
  663.         Delete.focus();
  664.         
  665.         // If threat cat is enabled show threat info
  666.         DisplayThreatInfo(RoadmapFrame.g_bThreatCatEnabled);
  667.     }
  668.     else
  669.     {
  670.         // Hide the Delete subtitle
  671.         DeleteSubTitle.style.display = "none";
  672.         
  673.         // Hide the Delete button
  674.         DeleteRow.style.display = "none";
  675.         
  676.         // Hide the Delete description
  677.         DeleteDescr.style.display = "none";
  678.         
  679.         // Hide the Delete title
  680.         RoadmapFrame.DeleteTitle(false);
  681.     }
  682. }
  683.  
  684. function DisplayThreatExclude(bShow)
  685. {
  686.     // Don't show the exclude panel if threat cat is off, no threats are remaining,
  687.     // or if this is an email scan
  688.     if( !RoadmapFrame.g_bThreatCatEnabled || RoadmapFrame.g_nRemainingThreats == 0 || RoadmapFrame.g_bEmailScanning )
  689.     {
  690.         ShowNextPage(THREAT_EXCLUDE_PAGE);
  691.         return;
  692.     }
  693.  
  694.     if( bShow )
  695.     {
  696.         CloseTooltip();
  697.         CurrentPage = THREAT_EXCLUDE_PAGE;
  698.         AxListCtrl.RepairWizardPage = CurrentPage;
  699.         
  700.         // Show the Threat Exclude subtitle
  701.         ExcludeSubTitle.style.display = "";
  702.         
  703.         // Show the Exclude button
  704.         ExcludeRow.style.display = "";
  705.         
  706.         // Show the Threat deleted count
  707.         DeletedCount.innerHTML = RoadmapFrame.g_nTotalThreatsDeleted;
  708.         
  709.         // Show the Exclude description 
  710.         ExcludeDescr.style.display = "";
  711.         
  712.         // Show the Exclude title
  713.         RoadmapFrame.ThreatExcludeTitle(true);
  714.         
  715.         // Set focus to the Exclude button
  716.         Exclude.focus();
  717.         
  718.         // Show only threat info
  719.         NonViralThreatCount.innerHTML = RoadmapFrame.g_nTotalThreatsDetected;
  720.         InfectionCount.style.display = "none";
  721.         DescriptionExt.style.display = "none";
  722.         ThreatConjunction.style.display = "none";
  723.         RepairText.style.display = "none";
  724.         NonViralThreatCount.style.display = "";
  725.         NonViralThreatDescriptionExt.style.display = "";
  726.         DeleteText.style.display = "";
  727.     }
  728.     else
  729.     {
  730.         // Hide the Threat Exclude subtitle
  731.         ExcludeSubTitle.style.display = "none";
  732.         
  733.         // Hide the Exclude button
  734.         ExcludeRow.style.display = "none";
  735.         
  736.         // Hide the Exclude description 
  737.         ExcludeDescr.style.display = "none";
  738.         
  739.         // Hide the Exclude title
  740.         RoadmapFrame.ThreatExcludeTitle(false);
  741.     }
  742. }
  743.  
  744. // Shows/Hides the threat categorization information at the top
  745. // of the repair wizard
  746. function DisplayThreatInfo(bShow)
  747. {
  748.     if( bShow == true )
  749.     {
  750.         // Show
  751.         NonViralThreatCount.innerHTML = RoadmapFrame.g_nTotalThreatsDetected;
  752.         DescriptionPeriod.style.display = "none";
  753.         ThreatConjunction.style.display = "";
  754.         NonViralThreatCount.style.display = "";
  755.         NonViralThreatDescriptionExt.style.display = "";
  756.     }
  757.     else
  758.     {
  759.         // Hide
  760.         DescriptionPeriod.style.display = "";
  761.         ThreatConjunction.style.display = "none";
  762.         NonViralThreatCount.style.display = "none";
  763.         NonViralThreatDescriptionExt.style.display = "none";
  764.     }
  765. }
  766.  
  767. function OnHelp()
  768. {
  769.     // Find out which page of the repair wizard the user is on.
  770.  
  771.     var iHelpID = 11580;
  772.  
  773.     if (CurrentPage == REPAIR_PAGE)
  774.         iHelpID = 11581;
  775.     else if (CurrentPage == QUARANTINE_PAGE)
  776.         iHelpID = 11582;
  777.     else if (CurrentPage == DELETE_PAGE)
  778.         iHelpID = 11583;
  779.     else if (CurrentPage == THREAT_EXCLUDE_PAGE)
  780.         iHelpID = 11704;
  781.     // Launch help for repair wizard.
  782.  
  783.     CommonUI.Help(iHelpID);
  784. }
  785.  
  786. function OnKeyboardHelp(objTR)
  787. {
  788.     // Launch help for repair wizard from keyboard
  789.     // The "SPACEBAR" and "ENTER" keys are used.
  790.    if ( (event.keyCode == ENTER_KEY) || (event.keyCode == SPACEBAR_KEY) )
  791.    {
  792.      CommonUI.Help(11580);     
  793.    }
  794. }
  795.  
  796. function OnEmailInfo(bIsKeyboard)
  797. {
  798.     // Is it a from keydown or mouse click?
  799.  
  800.     if (bIsKeyboard == 1)
  801.     {
  802.         // If it's from keydown, make sure it is a enter or spacebar else bail out.
  803.  
  804.         if ((event.keyCode != ENTER_KEY) && (event.keyCode != SPACEBAR_KEY))
  805.             return;
  806.     }
  807.  
  808.     // Launch email information tooltip.
  809.  
  810.     Tooltip(RoadmapFrame.EmailTitle.innerHTML, RoadmapFrame.EmailSender.innerHTML, 
  811.         RoadmapFrame.EmailRecipient.innerHTML, RoadmapFrame.EmailSubject.innerHTML);
  812. }