home *** CD-ROM | disk | FTP | other *** search
- var MainFrame = window.parent;
- var TimerID = 0;
- var PageOb = null;
- var SelectFrame = null;
- // Globals
- MainFrame.iLicType;
- MainFrame.iLicZone;
-
- var bReady = false;
- var g_lTimerID = 0;
-
- //Enums for button states
- var NEXT_BUTTON = 0;
- var BACK_BUTTON = 1;
- var SKIP_BUTTON = 2;
-
- var BUTTON_KILLED = -1;
- var BUTTON_DISABLE = 0;
- var BUTTON_ENABLE = 1;
- var BUTTON_HIDE = 2;
- var BUTTON_SHOW = 4;
- var BUTTON_SETFOCUS = 8;
-
-
- // DJSMar license Types
- var DJSMAR_LicenseType_Violated = -1;
- var DJSMAR_LicenseType_Retail = 0;
- var DJSMAR_LicenseType_Trial = 1;
- var DJSMAR_LicenseType_Rental = 2;
- var DJSMAR_LicenseType_TryDie = 3;
- var DJSMAR_LicenseType_Beta = 4;
- var DJSMAR_LicenseType_Unlicensed = 5;
- var DJSMAR_LicenseType_ESD = 6;
-
- // DJSMar license Zones
- var DJSMAR_LicenseZone_Trial = (0x00000001); // in a trial period
- var DJSMAR_LicenseZone_Expired = (0x00000002); // the license has expired
- var DJSMAR_LicenseZone_Warning = (0x00000004); // the license is about to expire
- var DJSMAR_LicenseZone_PreActivation = (0x00000008); // the license has never been activated
- var DJSMAR_LicenseZone_PostActivation = (0x00000010); // the license has been activated
- var DJSMAR_LicenseZone_Purchased = (0x00000020); // the license is in a purchased(AKA Activated) state
- var DJSMAR_LicenseZone_Violated = (0x00000040); // the license has been violated (i.e. failed security checks)
- var DJSMAR_LicenseZone_Killed = (0x00000080);
-
- function LoadStockPanel()
- {
- window.parent.frames("main").navigate( "StockPanel.htm" );
- }
-
- function OnLoad()
- {
- if ( MainFrame.g_bRoadmapFrameLoaded && MainFrame.g_bSelectFrameLoaded )
- {
- UpdatePage();
- }
- else
- {
- // Wait for the other frames to load
- g_lTimerID = window.setInterval( "UpdatePage()", 500 );
- }
- }
-
- function UpdatePage()
- {
- if ( MainFrame.g_bRoadmapFrameLoaded && MainFrame.g_bSelectFrameLoaded )
- {
-
- try
- {
- SelectFrame = window.parent.frames("bottom");
- clearInterval(g_lTimerID);
-
- // See what license zone and type we are and if we don't need to
- // go on to activation we can cut them off here by navigating to the
- // stockpanel
-
- MainFrame.iLicType = window.external.ObjectArg("DRM::LicenseType");
- MainFrame.iLicZone = window.external.ObjectArg("DRM::LicenseZone");
-
-
- if( (MainFrame.iLicType == DJSMAR_LicenseType_Violated) || ((MainFrame.iLicZone & DJSMAR_LicenseZone_Violated) == DJSMAR_LicenseZone_Violated) )
- {
- LoadStockPanel();
- return;
- }
-
- if( ((MainFrame.iLicZone & DJSMAR_LicenseZone_Purchased) == DJSMAR_LicenseZone_Purchased) &&
- (MainFrame.iLicZone & DJSMAR_LicenseZone_Warning) != DJSMAR_LicenseZone_Warning)
- {
- LoadStockPanel();
- return;
- }
-
- switch ( MainFrame.iLicType )
- {
- case DJSMAR_LicenseType_TryDie:
-
- // Show stock panels for trial and killed states
- LoadStockPanel();
- return;
-
- break;
-
- case DJSMAR_LicenseType_Beta:
- // Show stock panels for double expired
- if ( ((MainFrame.iLicZone & DJSMAR_LicenseZone_PostActivation) == DJSMAR_LicenseZone_PostActivation) &&
- ((MainFrame.iLicZone & DJSMAR_LicenseZone_Expired) == DJSMAR_LicenseZone_Expired))
- {
- LoadStockPanel();
- return;
- }
- break;
-
- default:
- break;
- }
-
- // Disable the buttons for beginning state
- SelectFrame.DisableButtons();
-
- // Show the skip button
- SelectFrame.SkipButton.disabled = true;
- SelectFrame.SkipButton.style.display = "";
- SelectFrame.SkipButton.innerHTML = ActBtnSkipText.innerHTML;
- SelectFrame.SkipButton.accessKey = ActBtnSkipHotKey.innerText
-
- SelectFrame.bControlDone = false;
-
- // Get a pointer to our Activation object
- PageOb = SymUIAx;
-
- // Set background to white
- SymUIAx.SetProperty("Color0", "FFFFFF");
- SymUIAx.SetProperty("Color1", "FFFFFF");
- SymUIAx.SetProperty("Color2", "FFFFFF");
- SymUIAx.SetProperty("Color3", "FFFFFF");
-
- // Set us to first in chain if we are the first panel.
- if( MainFrame.m_nCurrentPanel == 0 )
- SymUIAx.SetProperty( "FirstInChain", "true" );
- else
- SymUIAx.SetProperty( "FirstInChain", "false" );
-
- // Actwizard is always last in chain at least til they want to add ore apges to it
- SymUIAx.SetProperty( "LastInChain", "true" );
-
- // No LR in Actwizard
- SymUIAx.SetProperty( "SendLiveRegistration", "false");
-
- // Get the path to the helper DLL from the collection and tell the control
- SymUIAx.SetProperty( "HelperDLLPath", window.external.ObjectArg("DRM::ActivationUIPath"));
-
- SymUIAx.SetDataCollection( window.external.ObjectArg );
-
- SymUIAx.Initialize();
- }
- catch(err)
- {
- MainFrame.iLicType = DJSMAR_LicenseType_Violated;
- MainFrame.iLicZone = DJSMAR_LicenseZone_Violated;
-
- LoadStockPanel();
- }
- }
- }
-
-