home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 December / PCWorld_2006-12_cd.bin / komunikace / netscape / nsb-install-8-1-2.exe / chrome / aim.jar / content / aim / AimConfirmAccount.js < prev    next >
Text File  |  2006-01-06  |  1KB  |  50 lines

  1. var aimAdminAccountCallback = new Object();
  2. var adminManager;
  3.  
  4. aimAdminAccountCallback.OnConfirmAccountComplete = function()
  5. {
  6.     aimErrorBox(aimString("msg.confirmAccountSucess"));
  7.     window.close();
  8. }
  9.  
  10. aimAdminAccountCallback.OnConfirmAccountError = function(errMsg)
  11. {
  12.     aimErrorBox(errMsg);
  13.     window.close();
  14. }
  15.  
  16. myCAAdminExecutionCallback = new Object();
  17. myCAAdminExecutionCallback.ExecuteIfReady = function()
  18. {
  19.   try {
  20.     adminManager.ConfirmAccount(aimAdminAccountCallback);
  21.   }
  22.   catch(ex) {
  23.     dump("Failed to call ConfirmAccount. EX= " + ex + "\n");
  24.   }
  25.  
  26. }
  27. function AimConfirmAccountWndOnLoad() {
  28.     adminManager = aimAdminManager();
  29.     if (!adminManager) {
  30.         dump("Trying to create nsIAimAdminManager on my own..\n");
  31.         adminManager = Components.classes['@netscape.com/aim/IMManager;1'].getService(Components.interfaces.nsIIMManager).QueryInterface(Components.interfaces.nsIAimAdminManager);
  32.         if(!adminManager) {
  33.             dump("Unable to create nsIAimAdminManager..\n");
  34.             return;
  35.         }
  36.     }
  37.     
  38.   try {
  39.     adminManager.ExecuteIfReady(myCAAdminExecutionCallback);
  40.   }
  41.   catch(e) {
  42.     dump("Unable to call ExecuteIfReady. ex = " + ex + "\n");
  43.   }
  44. }
  45.  
  46.  
  47.  
  48.  
  49.  
  50.