home *** CD-ROM | disk | FTP | other *** search
/ Chip 2009 November / Chip_2009.11_CD.iso / I386 / nusrmgr.cp_ / nusrmgr.cpl / HTML / ACCOUNTPAGE.JS < prev    next >
Encoding:
Text File  |  2008-04-14  |  1.1 KB  |  43 lines

  1. function PageInit()
  2. {
  3. var oUser = top.window.g_oSelectedUser;
  4. top.window.PopulateLeftPane(null, idLearnAboutContent.innerHTML);
  5. var szTitle = top.window.IsSelf() ? idPageTitle.innerHTML : idAltPageTitle.innerHTML;
  6. idPageTitle.innerHTML = szTitle.replace(/%1/g, top.window.GetUserDisplayName(oUser));
  7. var iAccountType = oUser.setting("AccountType");
  8. switch (iAccountType)
  9. {
  10. case 0:
  11. case 2:
  12. default:
  13. iAccountType = -1;
  14. break;
  15. case 1:
  16. break;
  17. case 3:
  18. iAccountType = 0;
  19. break;
  20. }
  21. if (iAccountType == 0 && top.window.CountOwners() < 2)
  22. {
  23. idLimited.disabled = true;
  24. idCantChange.style.display = 'block';
  25. idOK.disabled = 'true';
  26. }
  27. AttachAccountTypeEvents(iAccountType);
  28. var aRadioButtons = idRadioGroup.children;
  29. if (iAccountType >= 0 && iAccountType <= aRadioButtons.length)
  30. {
  31. var selection = aRadioButtons[iAccountType].firstChild;
  32. selection.click();
  33. selection.focus();
  34. }
  35. else
  36. aRadioButtons[0].firstChild.focus();
  37. }
  38. function ApplyNewAccountType()
  39. {
  40. SetAccountType(top.window.g_oSelectedUser);
  41. top.window.g_Navigator.navigate("mainpage.htm", true);
  42. }
  43.