home *** CD-ROM | disk | FTP | other *** search
- ////////////////////////////////////////////////////////////////////////////////////////////
- //
- // PRODUCT: Norton Internet Security/Symantec Desktop Firewall
- //
- // NAME: PC_Wizard.js (Javascript file for PC_Wizard.HTM)
- //
- // Copyright (c) 2001 by Symantec Corporation. All rights reserved.
- //
- ////////////////////////////////////////////////////////////////////////////////////////////
-
- function OnLoad()
- {
- dialogheight = "420px"
- dialogWidth = "630px"
-
- CheckUser();
-
- }
-
- function CheckUser()
- {
- // MessageBox() Flags
- var MB_OK = 0x00000000;
- var MB_OKCANCEL = 0x00000001;
- var MB_ABORTRETRYIGNORE = 0x00000002;
- var MB_YESNOCANCEL = 0x00000003;
- var MB_YESNO = 0x00000004;
- var MB_RETRYCANCEL = 0x00000005;
-
- var MB_ICONHAND = 0x00000010;
- var MB_ICONQUESTION = 0x00000020;
- var MB_ICONEXCLAMATION = 0x00000030;
- var MB_ICONASTERISK = 0x00000040;
-
- var MB_USERICON = 0x00000080;
- var MB_ICONWARNING = MB_ICONEXCLAMATION;
- var MB_ICONERROR = MB_ICONHAND;
-
- var MB_ICONINFORMATION = MB_ICONASTERISK;
- var MB_ICONSTOP = MB_ICONHAND;
-
- var IDOK = 1;
- var IDCANCEL = 2;
- var IDABORT = 3;
- var IDRETRY = 4;
- var IDIGNORE = 5;
- var IDYES = 6;
- var IDNO = 7;
-
-
- // If User is not Administrator do not allow him to run
- // Security Assistant and exit
- var szUserType
- szUserType = UserManager.CurrentUserType;
- if(szUserType != "UT_SUPERVISOR")
- {
- webWind.MsgBox(StrID("IntroWizSupervisor"), UserManager.AppTitle, MB_OK | MB_ICONEXCLAMATION);
- window.navigate("res://closeme.xyz");
- return;
- }
-
- return;
- }
-
- // Variables and structures gloabl to the PCWizard
- var m_iAcounts = 0; // The amount of accounts to create member of the "pseudo" PCWizard class
-
- function AccountInfo()
- {
- var m_sAccountName;
- var m_sAccountPassword;
- var m_iAccountType;
- }
-
- function SetAccountNum(iCreated)
- {
- m_iAccounts = iCreated;
- }
-
- var aAccounts = new Array(5);
- aAccounts[0] = new AccountInfo();
- aAccounts[1] = new AccountInfo();
- aAccounts[2] = new AccountInfo();
- aAccounts[3] = new AccountInfo();
- aAccounts[4] = new AccountInfo();
-
- // Set the what Account Mode to use in the PC Wiz
- // Windows account type = 0
- // NIS old account type = 1
- var g_iAccountMode = 0;
- function SetAccountMode(iAccountMode)
- {
- g_iAccountMode = iAccountMode;
-
- var Contents = window.frames("contents",0);
- Contents.SetWizardLinks();
- }
-
- // Sets the Account information for an account
- // Paramters :
- // iAcountIndex - The index in the array of which acount to set
- // sAccountName - The name of the account created
- // sAccountPassword - The password created
- // iAccountType - The type this account was based off
-
- function SetAccountInfo(iAccountIndex, sAccountName, sAccountPassword, iAccountType)
- {
-
- // If a "null" paramter was passed in, it means we don't want to change the preset values
- if (sAccountName != null)
- aAccounts[iAccountIndex].m_sAccountName = sAccountName;
-
- if (sAccountPassword != null)
- aAccounts[iAccountIndex].m_sAccountPassword = sAccountPassword;
-
- if (iAccountType != null)
- aAccounts[iAccountIndex].m_iAccountType = iAccountType;
-
- }