home *** CD-ROM | disk | FTP | other *** search
- function PageInit()
- {
- top.window.PopulateLeftPane(null, idLearnAboutContent.innerHTML);
- AttachAccountTypeEvents();
- var iAccountType = 0;
- if (0 == top.window.CountOwners())
- {
- idLimited.disabled = true;
- idCantChange.style.display = 'block';
- }
- else if (null != top.window.g_iNewType)
- iAccountType = top.window.g_iNewType;
- var selection = idRadioGroup.children[iAccountType].firstChild;
- selection.click();
- selection.focus();
- }
- function CreateAccount()
- {
- var szName = top.window.g_szNewName;
- top.window.g_szNewName = null;
- if (szName && szName.length > 0)
- {
- var oNewUser = null;
- var szLoginName = szName;
- for (var n = 2; IsDuplicateLoginName(szLoginName); n++)
- szLoginName = szName + "_" + n;
- try
- {
- oNewUser = top.window.g_oUserList.create(szLoginName);
- if (szName != szLoginName && !IsDuplicateDisplayName(szName))
- oNewUser.setting("DisplayName") = szName;
- }
- catch (error)
- {
- top.window.g_szNewName = szName;
- if ((error.number & 0xffff) == 2202)
- {
- alert(top.window.L_NameNotValid_ErrorMessage);
- top.window.g_Navigator.back();
- }
- else
- throw error;
- }
- if (oNewUser)
- {
- var nErr = 0;
- try
- {
- SetAccountType(oNewUser);
- }
- catch (error)
- {
- nErr = (error.number & 0xffff);
- if (1387 == nErr)
- {
- top.window.g_oUserList.remove(oNewUser.setting("LoginName"), null);
- alert(top.window.L_NameIsComputer_ErrorMessage);
- top.window.g_szNewName = szName;
- top.window.g_Navigator.back();
- }
- else
- {
- throw error;
- }
- }
- if (0 == nErr)
- top.window.g_Navigator.navigate("mainpage2.htm", true);
- }
- }
- }
-