home *** CD-ROM | disk | FTP | other *** search
- g_ModuleID = 3009;
-
- var MainFrame = window.parent;
- var Register = true;
- var Activate = true;
- var nPanelSkippedTo = 0;
-
-
-
- function DisableButtons()
- {
- NextButton.disabled = true;
- NextButton.style.display = "";
- BackButton.disabled = true;
- BackButton.style.display = "";
- }
-
- function OnLoad()
- {
- DisableButtons();
- MainFrame.g_bSelectFrameLoaded = true;
- BackButton.disabled = true;
- }
-
- function OnSkipButton()
- {
- try
- {
- // If skip is renamed to finish and summon clicks it bail out.
- if( SkipButton.innerHTML == FinishBtnText.innerHTML )
- window.parent.frames("contents").OnCloseButton();
-
- // Get the current panel
- var nCurPanel = MainFrame.m_nCurrentPanel;
-
- // Roadmap frame to access objects local to him
- var RMFrame = window.parent.frames("contents");
-
- // If PageOb (activex that supports ICCIWNAvigation) is defined
- // let him get first crack at the skip button otherwise we are in control
- if((MainFrame.g_PageOb != null))
- {
- // PageOb has control - returns true
- if (MainFrame.g_PageOb.Skip())
- {
- return;
- }
- // PageOb gave up control - returns false
- else
- {
- // We have control so set the PageObject to null
- MainFrame.g_PageOb = null;
- window.parent.frames("contents").OnCloseButton();
- return;
- }
- }
-
- if( (MainFrame.m_aWizardPanels[nCurPanel].m_sTitle == "Registration"))
- {
- var RMFrame = window.parent.frames("contents");
- var SkipRegTo = 0;
-
- if( MainFrame.g_iLicenseType == 0)
- SkipRegTo = RMFrame.nActivationPanel;
- else
- SkipRegTo = RMFrame.nPostInstall;
-
- LoadPage( SkipRegTo );
- }
- }
- catch(err)
- {
- var msg = document.frames("Errors").document.all.ERR_MSG_NAVIGATION.innerText;
- var id = document.frames("Errors").document.all.ID_MSG_NAVIGATION.innerText;
- g_ErrorHandler.DisplayNAVError (msg, id);
- return;
- }
-
- }
-
- function OnNextButton()
- {
- try
- {
- // If next is renamed to finish and summon clicks it bail out.
- if( NextButton.innerHTML == FinishBtnText.innerHTML )
- window.parent.frames("contents").OnCloseButton();
-
- // Roadmap frame to access objects local to him
- var RMFrame = window.parent.frames("contents");
-
- // Get the next panel
- var nNextPanel = MainFrame.m_nCurrentPanel + 1;
-
- // If PageOb (activex that supports ICCIWNAvigation) is defined
- // let him get first crack at the next button otherwise we are in control
- if( MainFrame.g_PageOb != null )
- {
- // PageOb has control - returns true
- if ( MainFrame.g_PageOb.Next() )
- {
- return;
- }
- // PageOb gave up control - returns false
- else
- {
- // We have control so set the PageObject to null
- MainFrame.g_PageOb = null;
- window.parent.frames("contents").OnCloseButton();
- return;
- }
- }
-
- // Run the post action for the current panel
- if (MainFrame.m_nCurrentPanel >= 0)
- {
- if (MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_pPostAction != null)
- {
- MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_pPostAction();
- }
- }
-
- var nNextPanel = MainFrame.m_nCurrentPanel + 1;
-
- if(MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_sTitle == "SELECTACTIVATION" && !Register)
- {
- nPanelSkippedTo = nNextPanel;
-
- if(Activate)
- {
- nPanelSkippedTo = RMFrame.nActivationPanel;
- }
- else
- {
- nPanelSkippedTo = RMFrame.nSubscriptionPanel;
- }
-
- LoadPage(nPanelSkippedTo);
-
- return;
- }
-
- for (; nNextPanel < MainFrame.m_nMaxPanels; nNextPanel++)
- {
- if (MainFrame.m_aWizardPanels[nNextPanel].m_bLoadPanel == false || MainFrame.m_aWizardPanels[nNextPanel].m_bDisplayPanel == false)
- {
- // Run the pre action
- if (MainFrame.m_aWizardPanels[nNextPanel].m_pPreAction != null)
- {
- MainFrame.m_aWizardPanels[nNextPanel].m_pPreAction();
- }
-
- // Run the post action
- if (MainFrame.m_aWizardPanels[nNextPanel].m_pPostAction != null)
- {
- MainFrame.m_aWizardPanels[nNextPanel].m_pPostAction();
- }
-
- continue;
- }
- break;
- }
- LoadPage(nNextPanel);
- }
- catch(err)
- {
- var msg = document.frames("Errors").document.all.ERR_MSG_NAVIGATION.innerText;
- var id = document.frames("Errors").document.all.ERR_ID_NAVIGATION.innerText;
- g_ErrorHandler.DisplayNAVError (msg, id);
- return;
- }
- }
-
- function OnBackButton()
- {
- try
- {
- // Get the roadmap frame
- var RMFrame = window.parent.frames("contents");
-
- // Get the previous panel
- var nPrevPanel = MainFrame.m_nCurrentPanel - 1;
-
-
- // If PageOb (activex that supports ICCIWNAvigation) is defined
- // let him get first crack at the next button otherwise we are in control
- if( MainFrame.g_PageOb != null )
- {
- if( MainFrame.g_PageOb.Back() )
- {
- // PageOb has control - returns true
- return;
- }
- else
- {
- // PageOb has control - returns false
- MainFrame.g_PageOb = null;
- }
- }
-
- if ( nPanelSkippedTo == MainFrame.m_nCurrentPanel)
- {
- LoadPage(RMFrame.nSelectPanel);
-
- nPanelSkippedTo = 0;
- return;
- }
-
- if(MainFrame.g_iLicenseType == 1)
- {
- switch ( MainFrame.m_aWizardPanels[nPrevPanel].m_sTitle )
- {
- case "Registration":
- if(window.external.ObjectArg("DRM::LicenseState") != DJSMAR00_LicenseState_PURCHASED)
- {
- nPrevPanel=RMFrame.nActivationPanel;
-
- }
- break;
-
- default:
-
- break;
- }
-
- LoadPage(nPrevPanel);
- return;
- }
-
- for (; nPrevPanel >= 0; nPrevPanel--)
- {
- if (MainFrame.m_aWizardPanels[nPrevPanel].m_bLoadPage == false || MainFrame.m_aWizardPanels[nPrevPanel].m_bDisplayPage == false)
- {
- continue;
- }
- break;
- }
-
- LoadPage(nPrevPanel);
- }
- catch(err)
- {
- var msg = document.frames("Errors").document.all.ERR_MSG_NAVIGATION.innerText;
- var id = document.frames("Errors").document.all.ERR_ID_NAVIGATION.innerText;
- g_ErrorHandler.DisplayNAVError (msg, id);
- return;
- }
- }
-
- function LoadPage(nPanel)
- {
-
- if (nPanel > MainFrame.m_nMaxPanels - 1 || nPanel < -1)
- {
- return;
- }
-
-
- if (MainFrame.m_nCurrentPanel >= 0)
- {
- // Update the "content" frame
- MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_TitleID.style.backgroundImage = '';
- MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_Arrow.style.display = "none";
-
- MainFrame.m_nCurrentPanel = nPanel;
- MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_TitleID.style.backgroundImage = 'url(Current.gif)';
- MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_Arrow.style.display = "";
- }
- else
- {
- MainFrame.m_nCurrentPanel = nPanel;
-
- // Update the "content" frame
- MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_TitleID.style.backgroundImage = 'url(Current.gif)';
- MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_Arrow.style.display = "";
- }
-
- // Load the page into the "main" frame
- window.parent.frames("main").location.replace(MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_htm);
-
- switch (MainFrame.m_aWizardPanels[nPanel].m_sTitle)
- {
- case "Activation":
- SkipButton.style.display = "";
- SkipButton.disabled = false;
- SkipButton.innerHTML = ActSkipBtnText.innerHTML;
- SkipButton.accessKey = ActSkipHotKey.innerText;
- break;
-
- default:
- SkipButton.style.display = "none";
- txtHelpLink.style.display = "none";
- break;
- }
-
-
- // Disable the Back button
- if (MainFrame.m_nCurrentPanel <= MainFrame.m_nFirstPanel && MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_bLoadPanel)
- {
- BackButton.disabled = true;
- }
- else
- {
- BackButton.disabled = false;
- }
-
- // Determine the Next and Finish button state
- if (MainFrame.m_nCurrentPanel == MainFrame.m_nMaxPanels - 1)
- {
- // We are at the last panel, hide the Next button and show the Finish button
- NextButton.style.display = "none";
-
- SkipButton.disabled = false;
- SkipButton.style.display = "";
- SkipButton.accessKey = FinishHotKey.innerText;
- SkipButton.innerHTML = FinishBtnText.innerHTML;
- SkipButton.focus();
- }
- else
- {
- // We are not at the last panel, hide the Finish button and show the Next button
- NextButton.style.display = "";
- NextButton.disabled = false;
- }
-
- // Run the Pre action for the panel
- if (MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_pPreAction != null)
- MainFrame.m_aWizardPanels[MainFrame.m_nCurrentPanel].m_pPreAction();
-
- }
-