home *** CD-ROM | disk | FTP | other *** search
- //
- // Global variables
- //
- var g_nRemainingInfection = 0;
- var g_nTotalItemRepaired = 0;
- var g_nTotalItemRepairDeleted = 0;
- var g_nTotalItemQuarantined = 0;
- var g_nTotalItemDeleted = 0;
- var g_nTotalItemScanned = 0;
- var g_nTotalItemInfected = 0;
- var g_nTotalMBRScanned = 0;
- var g_nTotalMBRInfected = 0;
- var g_nTotalMBRRepaired = 0;
- var g_nTotalBRScanned = 0;
- var g_nTotalBRInfected = 0;
- var g_nTotalBRRepaired = 0;
- var g_bEmailScanning = false;
- var g_bThreatCatEnabled = false;
-
- //
- // Added for THREAT CATEGORIZATION
- //
- var g_nTotalThreatsDetected = 0;
- var g_nTotalThreatsDeleted = 0;
- var g_nTotalThreatsExcluded = 0;
- var g_nRemainingThreats = 0;
-
- var MainFrame = window.parent;
-
- MainFrame.m_nCurrentPanel = 0;
- MainFrame.m_nMaxPanels = 4;
- MainFrame.m_aWizardPanels = new Array(MainFrame.m_nMaxPanels);
- MainFrame.g_bRoadmapLoaded = false;
-
- // somthing like a union
- var nScanProgPanel = 0;
- var nRepairWizardPanel = 1;
- var nQuickSummaryPanel = 2;
- var nDetailSummaryPanel = 3;
-
- var RepairBackground;
- var QuarantineBackground;
- var DeleteBackground;
-
- function WizardPanel(TitleID, CategoryID, sTitle, htm)
- {
- this.m_TitleID = TitleID;
- this.m_CategoryID = CategoryID;
- this.m_sTitle = sTitle;
- this.m_htm = htm;
- this.m_bDisplayPanel = true;
- }
-
- function OnLoad()
- {
- // Initialize global variables
- MainFrame.m_aWizardPanels[nScanProgPanel] = new WizardPanel(ScanProgCat, null, "Scan Progress", "ScanProg.htm");
- MainFrame.m_aWizardPanels[nRepairWizardPanel] = new WizardPanel(RepairWizCat, null, "Repair Wizard", "RepairWizard.htm");
- MainFrame.m_aWizardPanels[nQuickSummaryPanel] = new WizardPanel(SummaryCat, null, "Quick Summary", "QuickSummary.htm");
- MainFrame.m_aWizardPanels[nDetailSummaryPanel] = new WizardPanel(SummaryCat, null, "Detail Summary", "DetailSummary.htm");
- MainFrame.g_bRoadmapLoaded = true;
-
- g_nTotalFileRepaired = 0;
- g_nTotalFileQuarantined = 0;
- g_nTotalFileDeleted = 0;
-
- // THREAT CATEGORIZATION
- g_nTotalThreatsDeleted = 0;
- g_nTotalThreatsExcluded = 0;
-
- // Show the exlude panel if threat categorization is enabled and it's not an email scan
- if( window.external.ObjectArg.ScanNonViralThreats && !window.external.ObjectArg.EmailDescription)
- DisplayExcludeRow(true);
- else
- DisplayExcludeRow(false);
-
- // Initialize local variables
- RepairBackground = RepairCat.style.backgroundImage;
- QuarantineBackground = QuarantineCat.style.backgroundImage;
- DeleteBackground = DeleteCat.style.backgroundImage;
- }
-
- function OnUnload()
- {
- // Delete all the Wizard Panel objects
-
- for (i = 0; i < MainFrame.m_nMaxPanels; i++)
- {
- delete MainFrame.m_aWizardPanels[i];
- }
- }
-
- function ScanProgressTitle(bShow)
- {
- MainFrame.m_nCurrentPanel = nScanProgPanel;
-
- if (bShow == true)
- {
- MainFrame.m_aWizardPanels[nScanProgPanel].m_TitleID.style.backgroundImage = 'url(Current.gif)';
- }
- else
- {
- MainFrame.m_aWizardPanels[nScanProgPanel].m_TitleID.style.backgroundImage = '';
- }
- }
-
- function RepairWizardTitle(bShow)
- {
- MainFrame.m_nCurrentPanel = nRepairWizardPanel;
-
- if (bShow == true)
- {
- MainFrame.m_aWizardPanels[nRepairWizardPanel].m_TitleID.style.backgroundImage = 'url(Current.gif)';
- }
- else
- {
- MainFrame.m_aWizardPanels[nRepairWizardPanel].m_TitleID.style.backgroundImage = '';
- }
- }
-
- function RepairTitle(bShow)
- {
- if (bShow == true)
- {
- RepairCat.style.backgroundImage = 'url(CurrentWiz.gif)';
- RepairArrow.style.display = "";
- }
- else
- {
- RepairCat.style.backgroundImage = '';
- RepairArrow.style.display = "none";
- }
- }
-
- function QuarantineTitle(bShow)
- {
- if (bShow == true)
- {
- QuarantineCat.style.backgroundImage = 'url(CurrentWiz.gif)';
- QuarantineArrow.style.display = "";
- }
- else
- {
- QuarantineCat.style.backgroundImage = '';
- QuarantineArrow.style.display = "none";
- }
- }
-
- function DeleteTitle(bShow)
- {
- if (bShow == true)
- {
- DeleteCat.style.backgroundImage = 'url(CurrentWiz.gif)';
- DeleteArrow.style.display = "";
- }
- else
- {
- DeleteCat.style.backgroundImage = '';
- DeleteArrow.style.display = "none";
- }
- }
-
- function ThreatExcludeTitle(bShow)
- {
- if (bShow == true)
- {
- Threat_ExcludeCat.style.backgroundImage = 'url(CurrentWiz.gif)';
- Threat_ExcludeArrow.style.display = "";
- }
- else
- {
- Threat_ExcludeCat.style.backgroundImage = '';
- Threat_ExcludeArrow.style.display = "none";
- }
- }
-
- function SummaryTitle(bShow)
- {
- MainFrame.m_nCurrentPanel = nQuickSummaryPanel;
-
- if (bShow == true)
- {
- MainFrame.m_aWizardPanels[nQuickSummaryPanel].m_TitleID.style.backgroundImage = 'url(Current.gif)';
- }
- else
- {
- MainFrame.m_aWizardPanels[nQuickSummaryPanel].m_TitleID.style.backgroundImage = '';
- }
- }
-
- function OnNextButton()
- {
- var nNextPanel = MainFrame.m_nCurrentPanel + 1;
-
- for (; nNextPanel < MainFrame.m_nMaxPanels; nNextPanel++)
- {
- if (MainFrame.m_aWizardPanels[nNextPanel].m_bDisplayPanel == false)
- {
- continue;
- }
- break;
- }
-
- LoadPage(nNextPanel);
- }
-
- function OnBackButton()
- {
- var nPrevPanel = MainFrame.m_nCurrentPanel - 1;
-
- for (; nPrevPanel >= 0; nPrevPanel--)
- {
- if (MainFrame.m_aWizardPanels[nPrevPanel].m_bDisplayPage == false)
- {
- continue;
- }
- break;
- }
-
- LoadPage(nPrevPanel);
- }
-
- function LoadPage(nPanel)
- {
- if (nPanel > MainFrame.m_nMaxPanels - 1 || nPanel < 0)
- {
- return;
- }
-
- if (MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_TitleID != null)
- {
- MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_TitleID.style.backgroundImage = '';
- }
-
- MainFrame.m_nCurrentPanel = nPanel;
-
- if (MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_TitleID != null)
- {
- MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_TitleID.style.backgroundImage = 'url(Current.gif)';
- }
-
- // Load the page into the "main" frame
- MainFrame.frames("main").navigate(MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_htm);
- }
-
- function OnCancelButton()
- {
- if (g_nRemainingInfection > 0)
- {
- // Make sure it's not from Email Scanning.
-
- if (g_bEmailScanning != true)
- {
- webWnd.MsgBox(InfectionRemaininWarning.innerHTML, ProductName.innerHTML, MB_OK | MB_ICONWARNING);
- }
- }
-
- // Close the window
- MainFrame.navigate("res://closeme.xyz");
- }
-
- function DisplayExcludeRow(bShow)
- {
- if( bShow == true )
- {
- ExcludeRow.style.display = "";
- table2_spacerimg1.height = 26;
- }
- else
- {
- ExcludeRow.style.display = "none";
- table2_spacerimg1.height = 90;
- }
- }