home *** CD-ROM | disk | FTP | other *** search
- ////////////////////////////////////////////////////////////////////////////////////////////
- //
- // PRODUCT: Norton Internet Security/Symantec Desktop Firewall
- //
- // NAME: wiz-Supervisor.js (Javascript file for wiz-Supervisor.HTM)
- //
- // Copyright (c) 2001 by Symantec Corporation. All rights reserved.
- //
- ////////////////////////////////////////////////////////////////////////////////////////////
-
- var g_OrignalSupervisorName;
-
- function OnTabOver()
- {
- // Last Control Tab over to the <back, next, close> button.
- var VK_TAB = 9;
- if (window.event.keyCode == VK_TAB)
- window.parent.frames("bottom",0).focus();
-
- }
-
- function OnLoad()
- {
- AcctName.value = parent.UserManager.CurrentUser;
- g_OrignalSupervisorName = parent.UserManager.CurrentUser;
- AcctName.focus();
- }
-
- function Page_GoNext()
- {
-
- // If they modified the Supervisor's name, create a new account, log him in, and delete the old account
- if(AcctName.value != g_OrignalSupervisorName)
- {
- parent.UserManager.ResetSupervisor(g_OrignalSupervisorName, AcctName.value);
-
- }
-
- // Make sure password and confirmation match
- if (Pass.value != PassB.value)
- {
- // See if the user did NOT want to change password
- // i.e. just clicked next in the administrator pane
- // (the fields are initialized in html to the values below)
- if (Pass.value == "LaKeRs" && PassB.value == "*RuLe*")
- return true;
-
- alert("Password does not match confirmation");
- return false;
- }
-
- // If password is empty, pass in empty string
- if(!Pass.value)
- {
- Pass.value = "";
- }
-
- if (!parent.UserManager.SetAdministratorPassword(AcctName.value, Pass.value))
- {
- // Password change failed, most probably the administrator account was deleted
- // so try creating a new account
- parent.UserManager.CreateAccount(AcctName.value, Pass.value, "3");
- }
-
- return true;
- }
-
- function Page_GoBack()
- {
- return true;
- }
-
- function OnKeyDownHandler()
- {
- // Last Control Tab over to the <back, next, close> button.
- var VK_ESCAPE = 27;
-
- if (window.event.keyCode == VK_ESCAPE)
- {
- // Escape key.. We want to exit out of the wizard..
- parent.window.navigate("res://closeme.xyz");
-
- }
-
- }