home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 May / 05_02.iso / software / nis / files / NIS / NIS.MSI / pcwiz.dll / HTML / NAVIGATION_PANE.JS < prev    next >
Encoding:
JavaScript  |  2001-12-01  |  6.8 KB  |  224 lines

  1. ////////////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // PRODUCT: Norton Internet Security/Symantec Desktop Firewall
  4. //
  5. // NAME:    navigation_pane.js (Javascript file for navigation_pane.HTM)
  6. //
  7. // Copyright (c) 2001 by Symantec Corporation. All rights reserved.
  8. //
  9. ////////////////////////////////////////////////////////////////////////////////////////////
  10.  
  11. var NISFE = 1;
  12. var NISNOAD = 2
  13. var NIS = 3;
  14. var NPF = 4;
  15. var SDF = 5;
  16.  
  17.  
  18. // Pane that allows you to choose
  19. var AccountModeHeadingPane = new WizardPane(window.AccountMode, window.AccountModeH, window.AccountMode, window.AccountModeH,
  20.     "Account Mode", "wiz-AccountMode.htm", null, null);
  21.  
  22.  
  23. // Windows Managed Panes
  24. var WindowsManagedHeadingPane = new WizardPane(window.WindowsManaged, window.WindowsManagedH, window.WindowsManaged, window.WindowsManagedH,
  25.     "Set Type", "wiz-SetType.htm", null, null);
  26.  
  27. var SetTypePane = new WizardPane(window.SetType, window.SetTypeH, window.WindowsManaged, window.WindowsManagedH,
  28.     "Set Type", "wiz-SetType.htm", null, null);
  29.  
  30.  
  31. // Application Managed Panes
  32. var ApplicationManagedHeadingPane = new WizardPane(window.ApplicationManaged, window.ApplicationManagedH, window.ApplicationManaged, window.ApplicationManagedH,
  33.     "Supervisor", "wiz-Supervisor.htm", null, null);
  34.  
  35. var SupervisorPane = new WizardPane(window.Supervisor, window.SupervisorH, window.ApplicationManaged, window.ApplicationManagedH,
  36.     "Supervisor", "wiz-Supervisor.htm", null, null);
  37.  
  38. var CreateAccountsPane = new WizardPane(window.CreateAccounts, window.CreateAccountsH, window.ApplicationManaged, window.ApplicationManagedH,
  39.     "Create Accounts", "wiz-CreateAccounts.htm", null, null);
  40.  
  41. var SetPasswordPane = new WizardPane(window.SetPassword, window.SetPasswordH, window.ApplicationManaged, window.ApplicationManagedH,
  42.     "Set Password", "wiz-SetPassword.htm", null, null);
  43.         
  44. var DefaultAccountPane = new WizardPane(window.DefaultAccount, window.DefaultAccountH, window.ApplicationManaged, window.ApplicationManagedH,
  45.     "Default Account", "wiz-DefaultAccount.htm", null, null);
  46.  
  47.  
  48. // Summary Pane
  49. var SummaryHeadingPane = new WizardPane(window.SummaryHeading, window.SummaryHeadingH, window.SummaryHeading, window.SummaryHeadingH,
  50.     "Summary", "wiz-Done.htm", null, null);
  51.  
  52.  
  53. // Pane Object
  54. function WizardPane(sID, shID, sHeading, sHLHeading, sTitle, shtm, pPreviousLink, pNextLink)
  55. {    
  56.     this.m_ID = sID;            // ID for non-HighLighted Pane
  57.     this.m_hID = shID;            // ID for Highlighted
  58.     this.m_Heading = sHeading;        // Heading for this Pane
  59.     this.m_HLHeading = sHLHeading;        // Highlighed Heading for this Pane
  60.     this.m_sTitle = sTitle;            // Title of the (Pane) Web Page
  61.     this.m_htm  = shtm;            // WebPage Link
  62.     this.m_bPageOn = true;            // bool switch to determine if Page exist
  63.     this.m_pPreviousLink = pPreviousLink;     // Pointer to Previous Pane
  64.     this.m_pNextLink = pNextLink;        // Pointer to Next Pane    
  65.  
  66. }
  67.  
  68.  
  69. // Return a pointer to the current Pane
  70. function FindPane(sPaneID)
  71. {    
  72.     switch(sPaneID)
  73.     {
  74.         case "Account Mode":
  75.             return     window.AccountModeHeadingPane;
  76.                     break;
  77.         case "Set Type":
  78.             return     window.SetTypePane;
  79.                     break;                     
  80.         case "Supervisor":
  81.             return     window.SupervisorPane;
  82.                     break;                  
  83.         case "Create Accounts":
  84.             return window.CreateAccountsPane;
  85.                     break;
  86.         case "Set Password":
  87.             return window.SetPasswordPane;
  88.                     break;                    
  89.         case "Default Account":
  90.             return window.DefaultAccountPane;
  91.             break;
  92.         case "Summary":
  93.             return window.SummaryHeadingPane;
  94.                     break;
  95.     }
  96. }
  97.  
  98.     
  99.  
  100. function SetWizardLinks()
  101. {        
  102.     
  103.     
  104.     var bFirstRun = PCWizHelper.PCWizFirstRun;
  105.     // Remove Supervisor Pane
  106.     if(!bFirstRun)
  107.     {
  108.         SupervisorPane.m_bPageOn = false;
  109.         SupervisorPane.m_ID.style.display="none";
  110.         SupervisorBR.style.display="none";
  111.         SupervisorTab.style.display="none";
  112.     }
  113.     
  114.     
  115.     iAccountMode = window.parent.g_iAccountMode;
  116.     // NEXT LINK!!!!
  117. //    AccountModeHeadingPane.m_pNextLink = WindowsManagedHeadingPane;        // Windows Managed was selected
  118. //    AccountModeHeadingPane.m_pNextLink = ApplicationManagedHeadingPane;    // Application Managed was selected
  119.     if(iAccountMode == 0)
  120.         AccountModeHeadingPane.m_pNextLink = SetTypePane;            // Windows Managed was selected
  121.     else
  122.     {
  123.         // Modify for Supervisor Pane
  124.         if(bFirstRun)        
  125.             AccountModeHeadingPane.m_pNextLink = SupervisorPane;            // Application Managed was selected
  126.         else
  127.             AccountModeHeadingPane.m_pNextLink = CreateAccountsPane
  128.  
  129.         
  130.     }
  131.  
  132.     
  133.     // Windows Managed Selected
  134.     if(iAccountMode == 0)
  135.     {
  136.         WindowsManagedHeadingPane.m_pNextLink  = SetTypePane;
  137.         SetTypePane.m_pNextLink = SummaryHeadingPane;
  138.     }
  139.     
  140.     // Application Managed Selected
  141.         // Windows Managed Selected
  142.     if(iAccountMode == 1)
  143.     {
  144.         // Modify for Supervisor Pane
  145.         if(bFirstRun)        
  146.             ApplicationManagedHeadingPane.m_pNextLink = CreateAccountsPane;    //First next is Create Accout
  147.         else
  148.             ApplicationManagedHeadingPane.m_pNextLink = SetPasswordPane;    // First "next" is SetPassword
  149.  
  150.         SupervisorPane.m_pNextLink = CreateAccountsPane;    // This line is redundant if Supervisor Page doesn't exist
  151.         CreateAccountsPane.m_pNextLink = SetPasswordPane;
  152.         SetPasswordPane.m_pNextLink = DefaultAccountPane;
  153.         DefaultAccountPane.m_pNextLink = SummaryHeadingPane;
  154.     }
  155.     
  156.     // Summary Heading
  157.     SummaryHeadingPane.m_pNextLink = null;
  158.  
  159.  
  160.  
  161.     // BACK LINK!!!!    
  162.     AccountModeHeadingPane.m_pPreviousLink = null;
  163.     
  164.     // Windows Managed Selected
  165.     if(iAccountMode == 0)
  166.     {
  167.         WindowsManagedHeadingPane.m_pPreviousLink = AccountModeHeadingPane;
  168.         SetTypePane.m_pPreviousLink = AccountModeHeadingPane;
  169.     }
  170.     
  171.     // Application Managed Selected
  172.     if(iAccountMode == 1)
  173.     {    
  174.         WindowsManagedHeadingPane.m_pPreviousLink = AccountModeHeadingPane;    
  175.         SupervisorPane.m_pPreviousLink = AccountModeHeadingPane;
  176.         
  177.         // Modify for Supervisor Pane
  178.         if(bFirstRun)    
  179.             CreateAccountsPane.m_pPreviousLink = SupervisorPane;
  180.         else
  181.             CreateAccountsPane.m_pPreviousLink = AccountModeHeadingPane;
  182.             
  183.         SetPasswordPane.m_pPreviousLink = CreateAccountsPane;
  184.         DefaultAccountPane.m_pPreviousLink = CreateAccountsPane;    
  185.         
  186.     }
  187.     
  188.     // Summary must select where to go back from
  189.     if(iAccountMode == 0)
  190.         SummaryHeadingPane.m_pPreviousLink = SetTypePane;    
  191.     else
  192.         SummaryHeadingPane.m_pPreviousLink = DefaultAccountPane;
  193.     
  194.  
  195. }
  196.  
  197.  
  198. function OnLoad()
  199. {    
  200.     // Set the Wizard Link for the first time..     
  201.     SetWizardLinks();
  202.  
  203. }
  204.  
  205. function OnFocus()
  206. {
  207.  
  208.     // Last Control Tab over to the <back, next, close> button.
  209.     window.parent.frames("main",0).focus();
  210. }
  211.  
  212. function OnKeyDownHandler()
  213. {
  214.     // Last Control Tab over to the <back, next, close> button.
  215.     var VK_ESCAPE = 27;
  216.  
  217.     if (window.event.keyCode == VK_ESCAPE)
  218.     {
  219.         // Escape key.. We want to exit out of the wizard..
  220.         parent.window.navigate("res://closeme.xyz");
  221.  
  222.     }
  223.     
  224. }