add:  } else if(args.result == 2) { ioService.offline = !ioService.offline; broadcaster.removeAttribute("offline"); broadcaster.setAttribute("tooltiptext", bundle.GetStringFromName("onlineTooltip")); broadcaster.setAttribute("label", bundle.GetStringFromName("gooffline")); FillInTooltip(broadcaster); offlineManager.goOnline(false, true, msgWindow);  } else if(args.result == 3) {  return; } break; case 1: ioService.offline = !ioService.offline; broadcaster.removeAttribute("offline"); broadcaster.setAttribute("tooltiptext", bundle.GetStringFromName("onlineTooltip")); broadcaster.setAttribute("label", bundle.GetStringFromName("gooffline")); FillInTooltip(broadcaster); offlineManager.goOnline(true, true, msgWindow);  break; case 2: ioService.offline = !ioService.offline; broadcaster.removeAttribute("offline"); broadcaster.setAttribute("tooltiptext", bundle.GetStringFromName("onlineTooltip")); broadcaster.setAttribute("label", bundle.GetStringFromName("gooffline")); FillInTooltip(broadcaster); offlineManager.goOnline(false, true, msgWindow);  break; } } else if(broadcaster) {  switch(prefDownloadMessages) { case 0: window.openDialog("chrome: "chrome,modal,titlebar,resizable=no", args); if(args.result == 1) { ioService.offline = !ioService.offline; broadcaster.setAttribute("offline", "true"); broadcaster.setAttribute("tooltiptext", bundle.GetStringFromName("offlineTooltip")); broadcaster.setAttribute("label", bundle.GetStringFromName("goonline")); FillInTooltip(broadcaster);   offlineManager.synchronizeForOffline(false, true, true, true, msgWindow);   } else if(args.result == 2) { ioService.offline = !ioService.offline; broadcaster.setAttribute("offline", "true"); broadcaster.setAttribute("tooltiptext", bundle.GetStringFromName("offlineTooltip")); broadcaster.setAttribute("label", bundle.GetStringFromName("goonline")); FillInTooltip(broadcaster);   offlineManager.synchronizeForOffline(false, false, true, true, msgWindow);   } else if(args.result == 3) {  return; } break; case 1: ioService.offline = !ioService.offline; broadcaster.setAttribute("offline", "true"); broadcaster.setAttribute("tooltiptext", bundle.GetStringFromName("offlineTooltip")); broadcaster.setAttribute("label", bundle.GetStringFromName("goonline")); FillInTooltip(broadcaster);   offlineManager.synchronizeForOffline(false, true, true, true, msgWindow);   break; case 2: ioService.offline = !ioService.offline; broadcaster.setAttribute("offline", "true"); broadcaster.setAttribute("tooltiptext", bundle.GetStringFromName("offlineTooltip")); broadcaster.setAttribute("label", bundle.GetStringFromName("goonline")); FillInTooltip(broadcaster);   offlineManager.synchronizeForOffline(false, false, true, true, msgWindow);  break; } } 
context: function MsgToggleWorkOffline(){  var ioService = nsJSComponentManager.getServiceByID("{9ac9e770-18bc-11d3-9337-00104ba0fd40}", "nsIIOService");  // var command = document.getElementById("Communicator:WorkMode");  // this is just code for my testing purposes, and doesn't have the proper UI, as in the offline spec.  // we could use the account manager, or add a new service, the offline manager.  // what the heck, might as well bite the bullet and add a new service.  offlineManager = Components.classes["@mozilla.org/messenger/offline-manager;1"].getService(Components.interfaces.nsIMsgOfflineManager);  if (ioService.offline)  {    ioService.offline = false;    // really want to use a progress window here    offlineManager.goOnline(true, true, msgWindow);    // if we were offline, then we're going online and should playback offline operations  }  else // we were online, so we're going offline and should download everything for offline use  {    // should use progress window here. params are:    // download news, download mail, send unsent messages, go offline when done, msg window    offlineManager.synchronizeForOffline(true, true, true, true, msgWindow);  }}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/5e553e31ab8ab654cfc5ca814b08917b892552af/commandglue.js/buggy/mailnews/base/resources/content/commandglue.js