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

  1. var MainFrame = window.parent;
  2. var TimerID = 0;
  3.  
  4. function OnLoad()
  5. {
  6.     // Cheesy IE hack alert
  7.     // If your page has no tabable controls and you disable tabbing to the body you will
  8.     // crash the webwindow.  Thus I have to enable tabbing to the subscription text
  9.     SubscriptionStartText.tabIndex = 1;
  10.     ExpirationDateText.tabIndex = 2;
  11.     document.body.tabIndex=-1;
  12.     
  13.     //window.parent.frames("main").document.tabIndex = -1;
  14.     
  15.     if (MainFrame.g_bRoadmapFrameLoaded == true && MainFrame.g_bSelectFrameLoaded == true)
  16.     {
  17.         UpdatePage();
  18.     }
  19.     else
  20.     {
  21.         TimerID = setInterval("UpdatePage()", 500);
  22.     }
  23. }
  24.  
  25. function UpdatePage()
  26. {
  27.     if (MainFrame.g_bRoadmapFrameLoaded == true && MainFrame.g_bSelectFrameLoaded == true)
  28.     {
  29.         // Remove the timer, we're done.
  30.         clearInterval(TimerID);
  31.         
  32.         var SelectFrame = window.parent.frames("bottom");
  33.         SelectFrame.NextButton.style.visibility = "visible";
  34.         SelectFrame.NextButton.disabled = false;
  35.         SelectFrame.NextButton.focus();
  36.     
  37.         var _LicenseRental = 2;
  38.         var _LicenseZonePostActivation = 16;
  39.         if (_LicenseRental == MainFrame.g_iLicenseType)
  40.         {
  41.             MainFrame.g_bActivateLicenseNow = true;
  42.             
  43.             // Disable the "Activate Now" and "Activate Later" buttons,
  44.             //  only if license is valid and has been activated.
  45.             if ((true == MainFrame.g_bLicenseValid) && 
  46.                 ((MainFrame.g_iLicenseZone & _LicenseZonePostActivation ) == _LicenseZonePostActivation))
  47.             {
  48.                 ActivationForm.ActivateNow.disabled = true;
  49.                 ActivationForm.ActivateLater.disabled = true;
  50.                 MainFrame.g_bActivateLicenseNow = false;
  51.             }
  52.         }
  53.         else
  54.         {
  55.             try
  56.             {
  57.                 SubscriptionLength.innerHTML = window.parent.frames("contents").CfgWizMgrObj.SubscriptionLength;
  58.                 StartDate = window.parent.frames("contents").CfgWizMgrObj.SubscriptionStartDate;
  59.                 EndDate = window.parent.frames("contents").CfgWizMgrObj.SubscriptionEndDate;
  60.             }
  61.             catch(err)
  62.             {
  63.                 window.parent.frames("contents").CfgWizMgrObj.NAVError.LogAndDisplay(0);
  64.                 return;
  65.             }
  66.  
  67.             if (StartDate == "")
  68.             {
  69.                 SubscriptionStartDate.style.display = "none";
  70.                 SubscriptionStartDateNotAvailable.style.display = "";
  71.             }
  72.             else
  73.             {
  74.                 SubscriptionStartDate.innerHTML = StartDate;
  75.             }
  76.  
  77.             if (EndDate == "")
  78.             {
  79.                 SubscriptionEndDate.style.display = "none";    
  80.                 SubscriptionEndDateNotAvailable.style.display = "";
  81.             }
  82.             else
  83.             {
  84.                 SubscriptionEndDate.innerHTML = EndDate;
  85.             }
  86.  
  87.             if ( MainFrame.g_bIsNAVPro )
  88.             {
  89.                 SubscriptionText1_pro.style.display = "";
  90.                 SubscriptionText1.style.display = "none";
  91.                 ProdName_pro.style.display = "";
  92.                 ProdName.style.display = "none";
  93.             }
  94.         }
  95.     }
  96. }
  97.  
  98. function OnActivateNowClick()
  99. {
  100.     MainFrame.g_bActivateLicenseNow = true;
  101. }
  102.  
  103. function OnActivateLaterClick()
  104. {
  105.     MainFrame.g_bActivateLicenseNow = false;
  106. }
  107.