home *** CD-ROM | disk | FTP | other *** search
- ////////////////////////////////////////////////////////////////////////////////////////////
- //
- // PRODUCT: Norton Internet Security/Symantec Desktop Firewall
- //
- // NAME: iw-AboutPassword.js (Javascript file for iw-AboutHomeNet.HTM)
- //
- // Copyright (c) 2002 by Symantec Corporation. All rights reserved.
- //
- ////////////////////////////////////////////////////////////////////////////////////////////
-
- function RefreshLinkText()
- {
- if (ccPassWord.Enabled)
- ToggleSpan.innerText = "off ";
- else
- ToggleSpan.innerText = "on ";
- }
-
- function OnLoad()
- {
- window.NISTitleName1.innerText = WrapNisum.ProductName;
- window.NISTitleName2.innerText = WrapNisum.ProductName;
-
- // Initialize our ccPassWord object
- ccPassWord.ProductName = WrapNisum.ProductName;
- ccPassWord.ProductID = 2; // Product ID for NIS is 2
- ccPassWord.FeatureName = "";
- ccPassWord.UserName = WrapNisum.CurrentUser;
- ccPassWord.UseWindowsAccounts = false;
-
- RefreshLinkText();
- }
-
- function Is9x()
- {
- var agt=navigator.userAgent.toLowerCase();;
- var is_win98 = ((agt.indexOf("win98")!=-1) || (agt.indexOf("windows 98")!=-1));
- var is_winme = ((agt.indexOf("win 9x 4.90")!=-1));
-
- if(!is_win98 && !is_winme)
- {
- return false;
- }
- else
- {
- return true;
- }
-
-
- }
-
- function TogglePasswordProtection()
- {
-
- var sProductType = WrapNisum.ProductType;
- var sSetPasswordPrompt = "you must set the password for the current user"
-
- switch (sProductType)
- {
- case "PT_SDF":
- case "PT_NPF":
- case "PT_PE":
- sSetPasswordPrompt = "you must set a password"
- break
-
- case "PT_NOAD":
- case "PT_FE":
- case "PT_PRO":
- break
- }
-
-
- if (ccPassWord.Enabled)
- ccPassWord.Enabled = false;
- else
- {
-
- if(PCWizHelper.bWindowsAccount == true && Is9x())
- {
-
- ccWebWindow.MsgBox("This feature cannot be turned on when windows account integration is enabled",
- WrapNisum.ProductName, 0);
-
- return ;
-
- }
-
- if (ccPassWord.UserPasswordSet)
- {
- // User has password; Switch it on
- ccPassWord.Enabled = true;
- ccWebWindow.MsgBox("Password Protection is on.",
- WrapNisum.ProductName, 0);
- }
- else
- {
- // User has no password; Set one before switching it on
- ccWebWindow.MsgBox("In order to enable Password Protection, " +
- sSetPasswordPrompt,
- WrapNisum.ProductName, 0);
- if (ccPassWord.Set(false))
- {
- // Password has been set; Switch it on
- ccPassWord.Enabled = true;
- ccWebWindow.MsgBox("Password Protection is on.",
- WrapNisum.ProductName, 0);
- }
- else
- {
- ccWebWindow.MsgBox("Password was not set, " +
- "Password Protection was not enabled",
- WrapNisum.ProductName, 0);
- }
- }
- }
- RefreshLinkText();
- }
-