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

  1. ////////////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // PRODUCT: Norton Internet Security/Symantec Desktop Firewall
  4. //
  5. // NAME:    PC_Wizard.js (Javascript file for PC_Wizard.HTM)
  6. //
  7. // Copyright (c) 2001 by Symantec Corporation. All rights reserved.
  8. //
  9. ////////////////////////////////////////////////////////////////////////////////////////////
  10.  
  11. function OnLoad()
  12. {
  13.     dialogheight = "420px"
  14.     dialogWidth = "630px"
  15.     
  16.     CheckUser();
  17.  
  18. }
  19.  
  20. function CheckUser()
  21. {
  22.     // MessageBox() Flags
  23.     var MB_OK =                     0x00000000;
  24.     var MB_OKCANCEL =               0x00000001;
  25.     var MB_ABORTRETRYIGNORE =       0x00000002;
  26.     var MB_YESNOCANCEL =            0x00000003;
  27.     var MB_YESNO =                  0x00000004;
  28.     var MB_RETRYCANCEL =            0x00000005;
  29.     
  30.     var MB_ICONHAND =               0x00000010;
  31.     var MB_ICONQUESTION =           0x00000020;
  32.     var MB_ICONEXCLAMATION =        0x00000030;
  33.     var MB_ICONASTERISK  =          0x00000040;
  34.     
  35.     var MB_USERICON =               0x00000080;
  36.     var MB_ICONWARNING =            MB_ICONEXCLAMATION;
  37.     var MB_ICONERROR =              MB_ICONHAND;
  38.     
  39.     var MB_ICONINFORMATION =        MB_ICONASTERISK;
  40.     var MB_ICONSTOP =               MB_ICONHAND;
  41.     
  42.     var IDOK =              1;
  43.     var IDCANCEL =          2;
  44.     var IDABORT =           3;
  45.     var IDRETRY =           4;
  46.     var IDIGNORE =          5;
  47.     var IDYES =             6;
  48.     var IDNO =              7;
  49.     
  50.  
  51.     // If User is not Administrator do not allow him to run 
  52.     // Security Assistant and exit
  53.     var szUserType
  54.     szUserType = UserManager.CurrentUserType;
  55.     if(szUserType != "UT_SUPERVISOR")
  56.     {
  57.         webWind.MsgBox(StrID("IntroWizSupervisor"), UserManager.AppTitle, MB_OK | MB_ICONEXCLAMATION);
  58.         window.navigate("res://closeme.xyz");
  59.         return;
  60.     }
  61.  
  62.     return;
  63. }
  64.  
  65. // Variables and structures gloabl to the PCWizard
  66. var m_iAcounts = 0;    // The amount of accounts to create member of the "pseudo" PCWizard class
  67.  
  68. function AccountInfo()
  69. {
  70.     var m_sAccountName;
  71.     var m_sAccountPassword;
  72.     var m_iAccountType;    
  73. }
  74.  
  75. function SetAccountNum(iCreated)
  76. {
  77.     m_iAccounts = iCreated;
  78. }
  79.  
  80. var aAccounts = new Array(5);
  81. aAccounts[0] = new AccountInfo();
  82. aAccounts[1] = new AccountInfo();
  83. aAccounts[2] = new AccountInfo();
  84. aAccounts[3] = new AccountInfo();
  85. aAccounts[4] = new AccountInfo();    
  86.  
  87. // Set the what Account Mode to use in the PC Wiz
  88. // Windows account type = 0
  89. // NIS old account type = 1
  90. var g_iAccountMode = 0;
  91. function SetAccountMode(iAccountMode)
  92. {
  93.     g_iAccountMode = iAccountMode;
  94.     
  95.     var Contents = window.frames("contents",0);
  96.     Contents.SetWizardLinks();
  97. }
  98.  
  99. // Sets the Account information for an account
  100. // Paramters :
  101. // iAcountIndex - The index in the array of which acount to set
  102. // sAccountName - The name of the account created
  103. // sAccountPassword - The password created
  104. // iAccountType - The type this account was based off 
  105.  
  106. function SetAccountInfo(iAccountIndex, sAccountName, sAccountPassword, iAccountType)
  107. {
  108.  
  109.     // If a "null" paramter was passed in, it means we don't want to change the preset values
  110.     if (sAccountName != null)
  111.         aAccounts[iAccountIndex].m_sAccountName = sAccountName;
  112.         
  113.     if (sAccountPassword != null)
  114.         aAccounts[iAccountIndex].m_sAccountPassword = sAccountPassword;
  115.  
  116.     if (iAccountType != null)
  117.         aAccounts[iAccountIndex].m_iAccountType = iAccountType;                
  118.         
  119. }