home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 January / 01_03.iso / software / snpf / NPF / NPF.MSI / IntroWiz.exe / 1033 / HTML / IW-NAVIGATION.JS < prev    next >
Encoding:
JavaScript  |  2002-09-21  |  3.9 KB  |  200 lines

  1. ////////////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // PRODUCT: Norton Internet Security/Symantec Desktop Firewall
  4. //
  5. // NAME:    iw-Navigation.js (Javascript file for iw-Navigation.HTM)
  6. //
  7. // Copyright (c) 2002 by Symantec Corporation. All rights reserved.
  8. //
  9. ////////////////////////////////////////////////////////////////////////////////////////////
  10.  
  11. function OnKeyDownHandler(oTabbedFrom)
  12. {
  13.     var VK_TAB = 9;
  14.     
  15.     if (oTabbedFrom.id == BackB)
  16.     {
  17.         if (window.event.keyCode == VK_TAB && (window.event.shiftKey))
  18.         {
  19.             window.parent.frames("contents",0).focus();
  20.             return;
  21.  
  22.         }
  23.         return;
  24.     }
  25.     
  26.     if (oTabbedFrom.id == NextB)
  27.     {
  28.         if (window.event.keyCode == VK_TAB && (window.event.shiftKey))
  29.         {
  30.             if(BackB.disabled == true)
  31.             {
  32.                 // Go To Conent Page
  33.                 window.parent.frames("contents",0).focus();
  34.                 return;
  35.             }
  36.         }
  37.         return;
  38.     }    
  39.     
  40.     // the close button doesn't call this handler, but we can leave this code just in case it's added
  41.     if (oTabbedFrom.id == CloseB)
  42.     {
  43.         if (window.event.keyCode == VK_TAB && (window.event.shiftKey != true))
  44.         {
  45.             window.parent.frames("contents",0).focus();    
  46.         }
  47.         return;
  48.     }
  49. }
  50.  
  51. function OnLoad()
  52. {
  53.     BackB.disabled = true;
  54.     BackB.style.display = "";            
  55.  
  56.     NextB.disabled = false;
  57.     NextB.style.display = "";            
  58.  
  59.     FinishB.disabled = true;
  60.     FinishB.style.display = "none";
  61.  
  62.     CloseB.disabled = false;
  63.     CloseB.style.display = "";
  64.  
  65.     NextB.focus();
  66.     
  67.     parent.window.g_bDoneLoadingIWNavigation = true;
  68. }
  69.  
  70. function SetContent(paneNew)
  71. {
  72.     if(paneNew == null)    
  73.     {
  74.         CloseWizard();
  75.     }
  76.     else
  77.     {
  78.         SetHighlight(paneNew);    
  79.         window.parent.frames("main",0).navigate(paneNew.m_htm);
  80.         window.parent.frames("contents",0).setNavigationItem(false);
  81.     
  82.         window.parent.g_paneCurrent = paneNew;
  83.         
  84.         SetWizardButtons();
  85.     }
  86. }
  87.  
  88.  
  89. function SetWizardButtons()
  90. {
  91.     var paneCurrent = window.parent.g_paneCurrent;
  92.  
  93.     BackB.style.display = "";            
  94.     CloseB.style.display = "";
  95.  
  96.     CloseB.disabled = false;
  97.  
  98.     if(paneCurrent.m_paneNext == null)    
  99.     {
  100.         CloseB.disabled = true;
  101.  
  102.         BackB.disabled = false;
  103.         
  104.         NextB.disabled = true;
  105.         NextB.style.display = "none";            
  106.         FinishB.disabled = false;
  107.         FinishB.style.display = "";
  108.     }
  109.     else if(paneCurrent.m_panePrevious == null)    
  110.     {
  111.         BackB.disabled = true;
  112.         
  113.         NextB.disabled = false;
  114.         NextB.style.display = "";            
  115.         FinishB.disabled = true;
  116.         FinishB.style.display = "none";
  117.     }
  118.     else
  119.     {
  120.         BackB.disabled = false;
  121.         
  122.         NextB.disabled = false;
  123.         NextB.style.display = "";            
  124.         FinishB.disabled = true;
  125.         FinishB.style.display = "none";
  126.     }
  127. }
  128.  
  129. function SetHighlight(pPane)
  130. {
  131.     // Set all the colors to white
  132.     var Contents = window.parent.frames("contents",0);
  133.     
  134.     Contents.IntroductionRow.bgColor ="transparent";
  135.     Contents.HomeNetworkingRow.bgColor ="transparent";
  136.     Contents.InternetAccessControlRow.bgColor ="transparent";
  137.     Contents.PrivacyControlRow.bgColor ="transparent";
  138.     Contents.PasswordRow.bgColor ="transparent";    
  139.     Contents.ParentalControlRow.bgColor ="transparent";
  140.     Contents.FinishRow.bgColor ="transparent";    
  141.     
  142.     pPane.m_Row.bgColor ="#cee3ff";    // Set the color
  143. }
  144.  
  145. function BackB_OnClick()
  146. {
  147.     var paneCurrent = window.parent.g_paneCurrent;
  148.  
  149.     if(paneCurrent.m_panePrevious == null)
  150.     {
  151.         return;
  152.     }
  153.  
  154.     var panePrevious = paneCurrent.m_panePrevious;    
  155.     
  156.     SetContent(panePrevious);
  157.  
  158.     if (BackB.disabled)
  159.     {
  160.         NextB.focus();
  161.     }
  162.     else
  163.     {
  164.         BackB.focus();
  165.     }
  166. }
  167.  
  168. function NextB_OnClick()
  169. {
  170.     var paneCurrent = window.parent.g_paneCurrent;
  171.     if(paneCurrent.m_sTitle == "Finished")
  172.     {
  173.         return;
  174.     }
  175.     else 
  176.     {
  177.         if(paneCurrent.m_paneNext == null)
  178.         {            
  179.             return;
  180.         }
  181.         var paneNext = paneCurrent.m_paneNext;
  182.  
  183.         SetContent(paneNext);
  184.  
  185.         if(NextB.disabled)
  186.         {
  187.             FinishB.focus();
  188.         }
  189.         else
  190.         {
  191.             NextB.focus();
  192.         }
  193.     }
  194. }
  195.  
  196. function CloseB_OnClick()
  197. {
  198.     CloseWizard();
  199. }
  200.