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

  1. var OS_TYPE_WIN9x = 0;
  2. var OS_TYPE_WINNT = 1;
  3. var OS_TYPE_SOLARIS = 2;
  4. var OS_TYPE_LINUX = 3;
  5. var OS_TYPE_WINME = 4;
  6. var OS_TYPE_WINXP = 5;
  7. var OS_TYPE_UNKNOWN = 6;
  8. var MainFrame = window.parent;
  9. var Scheduler;
  10. g_ModuleID = 3009;
  11. var TimerID = 0;
  12.  
  13. function OnLoad()
  14. {
  15.     // Cheesy IE hack alert
  16.     // If your page has no tabable controls and you disable tabbing to the body you will
  17.     // crash the webwindow.  Thus I have to enabled tabbing to the Text areas
  18.     document.body.tabIndex=-1;
  19.     PostInstallHeader_table.tabIndex=1;    
  20.     ConfigurationHeader_table.tabIndex=2;    
  21.     
  22.     if (MainFrame.g_bRoadmapFrameLoaded == true && MainFrame.g_bSelectFrameLoaded == true)
  23.     {
  24.         UpdatePage();
  25.     }
  26.     else
  27.     {
  28.         TimerID = setInterval("UpdatePage()", 500);
  29.     }
  30. }
  31.  
  32. function UpdatePage()
  33. {
  34.     if (MainFrame.g_bRoadmapFrameLoaded == true && MainFrame.g_bSelectFrameLoaded == true)
  35.     {
  36.         // Remove the timer, we're done.
  37.         clearInterval(TimerID);
  38.  
  39.         var SelectFrame = window.parent.frames("bottom");
  40.         
  41.         try
  42.         {
  43.             Scheduler = new ActiveXObject ("NAVTasks.Scheduler");
  44.         }
  45.         catch(err)
  46.         {
  47.             var msg = document.frames("Errors").document.all.ERR_MSG_NO_SCHEDULER.innerText;
  48.             var id = document.frames("Errors").document.all.ERR_ID_NO_SCHEDULER.innerText;
  49.             g_ErrorHandler.DisplayNAVError (msg, id);        
  50.             clearInterval(TimerID);
  51.             return;
  52.         }
  53.  
  54.         if (MainFrame.g_bShowLaunchLiveUpdate || MainFrame.g_bShowLaunchRescue || MainFrame.g_bShowLaunchFullSysScan || MainFrame.g_bShowEnableWeeklyScan || MainFrame.g_bShowEnableAsyncScan)
  55.         {
  56.                 
  57.             PostInstallHeader_table.style.display = "";
  58.             dashline_table1.style.display = "";
  59.             
  60.             var OSType = MainFrame.frames("contents").CfgWizMgrObj.OSType;
  61.             
  62.             // Enable Async Scan
  63.             if ((false == MainFrame.g_bShowEnableAsyncScan) || (OSType == OS_TYPE_WIN9x || OSType == OS_TYPE_WINME))
  64.             {
  65.                    AsyncScanRow.style.display = "none";
  66.             }
  67.             else if (MainFrame.g_bEnableAsyncScan == false)
  68.             {
  69.                 AsyncScanOn.style.display = "none";
  70.                 AsyncScanOff.style.display = "";
  71.             }
  72.                     
  73.             // Run LiveUpdate
  74.             if (false == MainFrame.g_bShowLaunchLiveUpdate)
  75.                    LiveUpdateRow.style.display = "none";
  76.             else if (MainFrame.g_bRunLiveUpdate == false)
  77.             {
  78.                 RunLiveUpdateOn.style.display = "none";
  79.                 RunLiveUpdateOff.style.display = "";
  80.             }
  81.         
  82.             // Run Rescue
  83.             if ((MainFrame.g_bShowLaunchRescue == true) && OSType == OS_TYPE_WIN9x || OSType == OS_TYPE_WINME)
  84.             {
  85.                 if (MainFrame.g_bCreateRescueDisk == false)
  86.                 {
  87.                     RunRescueOn.style.display = "none";
  88.                     RunRescueOff.style.display = "";
  89.                 }
  90.             }
  91.             else
  92.             {
  93.                 RescueRow.style.display = "none";
  94.             }
  95.         
  96.             // Run full system scan
  97.             if (false == MainFrame.g_bShowLaunchFullSysScan)
  98.                    FullSystemScanRow.style.display = "none";
  99.             else if (MainFrame.g_bFullSystemScan == false)
  100.             {
  101.                 RunFullSystemScanOn.style.display = "none";
  102.                 RunFullSystemScanOff.style.display = "";
  103.             }
  104.  
  105.             var IsSchedulerInstalled;
  106.  
  107.             try
  108.             {
  109.                 IsSchedulerInstalled = Scheduler.Installed;
  110.             }
  111.             catch(err)
  112.             {
  113.                 Scheduler.NAVError.LogAndDisplay(0);
  114.             }
  115.  
  116.             if (IsSchedulerInstalled == true)
  117.             {
  118.                 // Check for the default state of WeeklyScan
  119.                 if (false == MainFrame.g_bShowEnableWeeklyScan)
  120.                 {
  121.                         ScheduleScanRow.style.display = "none";
  122.                     }
  123.                        else if (MainFrame.g_bScheduleScan == false)
  124.                 {
  125.                     ScheduleScanOn.style.display = "none";
  126.                     ScheduleScanOff.style.display = "";
  127.                 }
  128.  
  129.                 // AutoLiveUpdate status
  130.                 if (false == MainFrame.g_bLicenseValid)
  131.                 {
  132.                     AutoLiveUpdateOn.style.display = "none";
  133.                     AutoLiveUpdateLicenseInactive.style.display = "";
  134.                 }
  135.                 else if (MainFrame.g_bEnableALU == false)
  136.                 {        
  137.                     AutoLiveUpdateOn.style.display = "none";
  138.                     AutoLiveUpdateOff.style.display = "";
  139.                 }            
  140.             }
  141.             else
  142.             {
  143.                 ScheduleScanRow.style.display = "none";
  144.                 AutoLiveUpdateRow.style.display = "none";
  145.             }
  146.         }
  147.  
  148.         // If License is inactive, set status of rest of items to inactive
  149.  
  150.         // Auto Protect status
  151.         if (false == MainFrame.g_bLicenseValid)
  152.         {
  153.             AutoProtectOn.style.display = "none";
  154.             AutoProtectLicenseInactive.style.display = "";
  155.         }
  156.         else if (MainFrame.g_bEnableAP == false)
  157.         {
  158.             AutoProtectOn.style.display = "none";
  159.             AutoProtectOff.style.display = "";
  160.         }
  161.  
  162.         // Email Scanning status
  163.         if (false == MainFrame.g_bLicenseValid)
  164.         {
  165.             EmailScanningInOn.style.display = "none";
  166.             EmailScanningInLicenseInactive.style.display = "";
  167.             EmailScanningOutOn.style.display = "none";
  168.             EmailScanningOutLicenseInactive.style.display = "";
  169.  
  170.         }
  171.         else 
  172.         {
  173.             if (MainFrame.g_bEnableEmailScanningIn == false)
  174.             {
  175.                 EmailScanningInOn.style.display = "none";
  176.                 EmailScanningInOff.style.display = "";
  177.             }
  178.         
  179.             if (MainFrame.g_bEnableEmailScanningOut == false)
  180.             {
  181.                 EmailScanningOutOn.style.display = "none";
  182.                 EmailScanningOutOff.style.display = "";
  183.             }
  184.         }
  185.  
  186.         // ScriptBlocking status
  187.         if (MainFrame.g_bScriptBlockingInstalled == true)
  188.         {
  189.             if (false == MainFrame.g_bLicenseValid)
  190.             {
  191.                 ScriptBlockingOn.style.display = "none";
  192.                 ScriptBlockingLicenseInactive.style.display = "";
  193.             }
  194.             else if (MainFrame.g_bEnableScriptBlocking == false)
  195.             {
  196.                 ScriptBlockingOn.style.display = "none";
  197.                 ScriptBlockingOff.style.display = "";
  198.             }
  199.         }
  200.         else
  201.         {
  202.             ScriptBlockingRow.style.display = "none";
  203.         }
  204.  
  205.         var IsSchedulerInstalled;
  206.  
  207.         try
  208.         {
  209.             IsSchedulerInstalled = Scheduler.Installed;
  210.         }
  211.         catch(err)
  212.         {
  213.             Scheduler.NAVError.LogAndDisplay(0);
  214.         }
  215.  
  216.         if (IsSchedulerInstalled == true)
  217.         {    
  218.             // AutoLiveUpdate status
  219.             if (false == MainFrame.g_bLicenseValid)
  220.             {
  221.                 AutoLiveUpdateOn.style.display = "none";
  222.                 AutoLiveUpdateLicenseInactive.style.display = "";
  223.             }        
  224.             else if (MainFrame.g_bEnableALU == false)
  225.             {                            
  226.                 AutoLiveUpdateOn.style.display = "none";
  227.                 AutoLiveUpdateOff.style.display = "";
  228.             }
  229.         }
  230.         else
  231.         {
  232.             AutoLiveUpdateRow.style.display = "none";
  233.         }
  234.     
  235.         // Show License status for managed rental.
  236.         var _LicenseRental = 2;
  237.         
  238.         if (_LicenseRental == MainFrame.g_iLicenseType)
  239.         {
  240.             LicensingRow.style.display = "";
  241.             if (false == MainFrame.g_bLicenseValid)
  242.             {
  243.                 LicenseActive.style.display = "none";
  244.                 LicenseInactive.style.display = "";
  245.             }
  246.         }
  247.  
  248.         if ( MainFrame.g_bIsNAVPro )
  249.         {
  250.             AdditionalInfoTable_Cell1_pro.style.display = "";
  251.             AdditionalInfoTable_Cell1.style.display = "none";
  252.         }
  253.     }
  254. }
  255.