home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 January / 01_03.iso / software / snpf / NPF / NPF.MSI / IntroWiz.exe / 1033 / HTML / NAVIGATION_PANE.JS < prev    next >
Encoding:
JavaScript  |  2002-09-21  |  9.2 KB  |  291 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) 2002 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 NISPRO = 5;
  16. var SDF = 6;
  17.  
  18.  
  19. var NOT_PRESENT =0;
  20. var PRESENT = 1;
  21. var PRESENT_FAKE=2;
  22.  
  23. var g_IntroductionPane;
  24. var g_HomeNetworkingPane;
  25. var g_InternetAccessControlPane;
  26. var g_PrivacyControlPane;
  27. var g_PasswordPane;
  28. var g_ParentalControlPane;
  29. var g_FinishPane;
  30.     
  31.  
  32.  
  33. // ******************************************************************************************************** //
  34. function JumpToHere(sPaneName)
  35. {
  36.     // Set all the row backgrounds to transparent
  37.     IntroductionRow.bgColor                ="transparent";
  38.     HomeNetworkingRow.bgColor            ="transparent";
  39.     InternetAccessControlRow.bgColor    ="transparent";
  40.     PrivacyControlRow.bgColor            ="transparent";
  41.     PasswordRow.bgColor                    ="transparent";    
  42.     ParentalControlRow.bgColor            ="transparent";
  43.     FinishRow.bgColor                    ="transparent";
  44.  
  45.     switch(sPaneName)
  46.     {
  47.         case "Introduction":
  48.             window.parent.g_paneCurrent = g_IntroductionPane;
  49.             break;
  50.         case "HomeNetworking":
  51.             window.parent.g_paneCurrent = g_HomeNetworkingPane;
  52.             break;
  53.         case "InternetAccessControl":
  54.             window.parent.g_paneCurrent = g_InternetAccessControlPane;
  55.             break;
  56.         case "PrivacyControl":
  57.             window.parent.g_paneCurrent = g_PrivacyControlPane;    
  58.             break;
  59.         case "Password":
  60.             window.parent.g_paneCurrent = g_PasswordPane;
  61.             break;
  62.         case "ParentalControl":
  63.             window.parent.g_paneCurrent = g_ParentalControlPane;
  64.             break;
  65.         case "Finish":
  66.             window.parent.g_paneCurrent = g_FinishPane;
  67.             break;
  68.     }
  69.     
  70.     parent.window.frames("main",0).navigate(window.parent.g_paneCurrent.m_htm);
  71.     window.parent.g_paneCurrent.m_Row.bgColor =  "#cee3ff";
  72.  
  73.     CallSetWizardButtons();
  74. }
  75.  
  76. // Pane Object
  77. function WizardPane(sID, sRow, shID, sHeading, sHLHeading, sTitle, sHTM, panePrevious, paneNext, Span)
  78. {
  79.     this.m_ID = sID;                        // ID for non-HighLighted Pane
  80.     this.m_Row = sRow;                        // ID for Highlighted    
  81.     this.m_hID = shID;                        // ID for Highlighted
  82.     this.m_Heading = sHeading;                // Heading for this Pane
  83.     this.m_HLHeading = sHLHeading;            // Highlighed Heading for this Pane
  84.     this.m_sTitle = sTitle;                    // Title of the (Pane) Web Page
  85.     this.m_htm  = sHTM;                        // WebPage Link
  86.     this.m_bPageOn = true;                    // bool switch to determine if Page exist
  87.     this.m_panePrevious = panePrevious;     // Previous Pane
  88.     this.m_paneNext = paneNext;                // Next Pane    
  89.     this.m_Span    = Span;
  90.  
  91. }
  92.  
  93. // Return a pointer to the current Pane
  94. function FindPane(sPaneID)
  95. {    
  96.     switch(sPaneID)
  97.     {
  98.         case "Introduction":
  99.             return g_IntroductionPane;
  100.             break;  
  101.         case "Home Networking":
  102.             return g_HomeNetworkingPane;
  103.             break;                  
  104.         case "Program Scan":
  105.             return g_InternetAccessControlPane;
  106.             break;
  107.         case "Privacy Control":
  108.             return g_PrivacyControlPane;
  109.             break;
  110.         case "Password":
  111.             return g_PasswordPane;
  112.             break;                    
  113.         case "Parental Control":
  114.             return g_ParentalControlPane;
  115.             break;    
  116.         case "Productivity Control":
  117.             return g_ParentalControlPane;
  118.             break;
  119.         case "Finished":
  120.             return g_FinishPane;
  121.              break;
  122.     }
  123. }
  124.  
  125. function SetProductType()
  126. {
  127.     var iProudctType = NISFE;
  128.     var sProductType = WrapNisum.ProductType;
  129.     switch (sProductType)
  130.     {
  131.         case "PT_SDF":
  132.         iProductType = SDF;
  133.         break
  134.         
  135.         case "PT_NPF":
  136.         iProductType = NPF        
  137.         break
  138.         
  139.         case "PT_NOAD":
  140.         iProductType = NISNOAD    
  141.         break
  142.         
  143.         case "PT_FE":
  144.         iProductType = NISFE
  145.         break
  146.         
  147.         case "PT_PE":
  148.         iProductType = NIS
  149.         break;
  150.         
  151.         case "PT_PRO":
  152.         iProductType = NISPRO
  153.         break;
  154.         
  155.     }
  156.  
  157.     switch (iProductType)
  158.     {
  159.         case NISPRO:
  160.         case NISNOAD:    // No Ad Blocking is now the same in Security Assistant since we took out the page    
  161.         case NISFE:        // NIS with Parental Control Enabled
  162.         
  163.             // Next Link
  164.             g_IntroductionPane.m_paneNext = g_HomeNetworkingPane;
  165.             g_HomeNetworkingPane.m_paneNext = g_InternetAccessControlPane;
  166.             g_InternetAccessControlPane.m_paneNext = g_PrivacyControlPane;            
  167.             g_PrivacyControlPane.m_paneNext = g_PasswordPane;
  168.             g_PasswordPane.m_paneNext = g_ParentalControlPane;            
  169.             g_ParentalControlPane.m_paneNext = g_FinishPane;    
  170.             g_FinishPane.m_paneNext = null;
  171.             
  172.             // Back Link
  173.             g_IntroductionPane.m_panePrevious = null;
  174.             g_HomeNetworkingPane.m_panePrevious = g_IntroductionPane;
  175.             g_InternetAccessControlPane.m_panePrevious = g_HomeNetworkingPane;            
  176.             g_PrivacyControlPane.m_panePrevious = g_InternetAccessControlPane;
  177.             g_PasswordPane.m_panePrevious = g_PrivacyControlPane;            
  178.             g_ParentalControlPane.m_panePrevious = g_PasswordPane;                                    
  179.             g_FinishPane.m_panePrevious = g_ParentalControlPane;
  180.             
  181.             break;                
  182.             
  183.         case NIS: // NPF Security Assistant should look the same as NIS        
  184.         case NPF:    
  185.         case SDF:
  186.             // Remove Privacy Control, Norton AntiVirus, AdBlocking, Parental Control, 
  187.             // SDF will have to decide what pages they wanna keep cuz I sure don't know
  188.             // Right now just make it look like NIS
  189.         
  190.             // Next Link
  191.             g_IntroductionPane.m_paneNext = g_HomeNetworkingPane;
  192.             g_HomeNetworkingPane.m_paneNext = g_InternetAccessControlPane;
  193.             g_InternetAccessControlPane.m_paneNext = g_PrivacyControlPane;            
  194.             g_PrivacyControlPane.m_paneNext = g_PasswordPane;
  195.             g_PasswordPane.m_paneNext = g_FinishPane;
  196.             g_FinishPane.m_paneNext = null;                        
  197.             // Parental Control Page goes away
  198.             
  199.             // Back Link
  200.             g_IntroductionPane.m_panePrevious = null;
  201.             g_HomeNetworkingPane.m_panePrevious = g_IntroductionPane;
  202.             g_InternetAccessControlPane.m_panePrevious = g_HomeNetworkingPane;            
  203.             g_PrivacyControlPane.m_panePrevious = g_InternetAccessControlPane;
  204.             g_PasswordPane.m_panePrevious = g_PrivacyControlPane;
  205.             g_FinishPane.m_panePrevious = g_PasswordPane;
  206.                             
  207.             // Parental Control Page goes away                            
  208.             g_ParentalControlPane.m_bPageOn = false;
  209.             g_ParentalControlPane.m_Row.style.display = "none";
  210.             
  211.             break;            
  212.     }
  213.  
  214. }
  215.  
  216. function OnLoad()
  217. {
  218.     g_IntroductionPane = new WizardPane(window.Introduction, window.IntroductionRow, window.IntroductionH,  window.configHeading, window.configHeadingH,
  219.         "Introduction", "iw-Intro.htm", null, null, window.IntroductionSpan);
  220.         
  221.     g_HomeNetworkingPane = new WizardPane(window.HomeNetworking, window.HomeNetworkingRow, window.HomeNetworkingH,  window.configHeading, window.configHeadingH,
  222.         "HomeNetworking", "iw-AboutHomeNet.htm", null, null, window.HomeNetworkingSpan);
  223.         
  224.     g_InternetAccessControlPane = new WizardPane(window.InternetAccessControl, window.InternetAccessControlRow, window.InternetAccessControlH,  window.configHeading, window.configHeadingH,
  225.         "ProgramControl", "iw-AboutIAC.htm", null, null, window.InternetAccessControlSpan);
  226.  
  227.     g_PrivacyControlPane = new WizardPane(window.PrivacyControl, window.PrivacyControlRow, window.PrivacyControlH, window.configHeading, window.configHeadingH,
  228.         "PrivacyControl", "iw-AboutPrivacyControl.htm", null, null, window.PrivacyControlSpan);
  229.  
  230.     g_PasswordPane = new WizardPane(window.Password, window.PasswordRow, window.PasswordH, window.configHeading, window.configHeadingH,
  231.         "Password", "iw-AboutPassword.htm", null, null, window.PasswordSpan);
  232.         
  233.     g_ParentalControlPane = new WizardPane(window.ParentalControl, window.ParentalControlRow, window.ParentalControlH, window.configHeading, window.configHeadingH,
  234.         "ParentalControl", "iw-AboutParentalControl.htm", null, null, window.ParentalControlSpan);
  235.             
  236.     g_FinishPane = new WizardPane(window.finishedHeading, window.FinishRow, window.finishedHeadingH, window.finishedHeading, window.finishedHeadingH,
  237.         "Finished", "iw-Summary.htm", null, null, window.FinishSpan);
  238.  
  239.     SetProductType();
  240.  
  241.     JumpToHere('Introduction');
  242.     setNavigationItem(false);
  243. }
  244.  
  245. function Table_OnKeyDown()
  246. {
  247.     // Last Control Tab over to the <back, next, close> button.
  248.     var VK_UP = 38;
  249.     var VK_DOWN = 40;
  250.  
  251.     if(VK_UP == event.keyCode)
  252.     {
  253.         if(window.parent.g_paneCurrent.m_panePrevious != null)
  254.         {
  255.             parent.window.frames("main",0).navigate(window.parent.g_paneCurrent.m_panePrevious.m_htm);
  256.             parent.window.m_paneCurrent = window.parent.g_paneCurrent.m_panePrevious;
  257.             setNavigationItem(true);
  258.         }
  259.     }
  260.     
  261.     if(VK_DOWN == event.keyCode)
  262.     {
  263.         if(window.parent.g_paneCurrent.m_paneNext != null)
  264.         {
  265.             parent.window.frames("main",0).navigate(window.parent.g_paneCurrent.m_paneNext.m_htm);
  266.             parent.window.m_paneCurrent = window.parent.g_paneCurrent.m_paneNext;
  267.             setNavigationItem(true);
  268.         }
  269.     }
  270. }
  271.  
  272.  
  273. function setNavigationItem(bSetFocus)
  274. {
  275.     IntroductionSpan.tabIndex            = "-1";
  276.     HomeNetworkingSpan.tabIndex            = "-1";
  277.     InternetAccessControlSpan.tabIndex    = "-1";
  278.     PrivacyControlSpan.tabIndex            = "-1";
  279.     PasswordSpan.tabIndex                = "-1";
  280.     ParentalControlSpan.tabIndex        = "-1";
  281.     FinishSpan.tabIndex                    = "-1";
  282.  
  283.     window.parent.g_paneCurrent.m_Span.tabIndex = 1;
  284.     
  285.     if(bSetFocus)
  286.     {
  287.         window.parent.g_paneCurrent.m_Span.focus();
  288.     }
  289.     
  290.