rem:  doSetOKCancel(subscribeOK,subscribeCancel); 
context: function SubscribeOnLoad(){  //dump("SubscribeOnLoad()\n");  gSubscribeBundle = document.getElementById("bundle_subscribe");	  gSubscribeTree = document.getElementById('subscribetree');  gSearchOutlinerBoxObject = document.getElementById("searchOutliner").boxObject.QueryInterface(Components.interfaces.nsIOutlinerBoxObject);  gNameField = document.getElementById('namefield');  gNameFieldLabel = document.getElementById('namefieldlabel');  gSubscribeDeck = document.getElementById("subscribedeck");  msgWindow = Components.classes[msgWindowContractID].createInstance(Components.interfaces.nsIMsgWindow);  msgWindow.statusFeedback = gStatusFeedback;  msgWindow.SetDOMWindow(window);  doSetOKCancel(subscribeOK,subscribeCancel);	// look in arguments[0] for parameters	if (window.arguments && window.arguments[0]) {		if ( window.arguments[0].okCallback ) {			top.okCallback = window.arguments[0].okCallback;		}	}		gServerURI = null;	if (window.arguments[0].preselectedURI) {		var uri = window.arguments[0].preselectedURI;		//dump("subscribe: got a uri," + uri + "\n");		var folder = GetMsgFolderFromUri(uri);		//dump("folder="+folder+"\n");		//dump("folder.server="+folder.server+"\n");		try {                        CleanUpSearchView();			gSubscribableServer = folder.server.QueryInterface(Components.interfaces.nsISubscribableServer);                        // enable (or disable) the search related UI                        EnableSearchUI();			gServerURI = folder.server.serverURI;		}		catch (ex) {			//dump("not a subscribable server\n");                        CleanUpSearchView();			gSubscribableServer = null;			gServerURI = null;		}	}	if (!gServerURI) {		//dump("subscribe: no uri\n");		//dump("xxx todo:  use the default news server.  right now, I'm just using the first server\n");		var serverMenu = document.getElementById("serverMenu");		var menuitems = serverMenu.getElementsByTagName("menuitem");				if (menuitems.length > 1) {			gServerURI = menuitems[1].id;		}		else {			//dump("xxx todo none of your servers are subscribable\n");			//dump("xxx todo fix this by disabling subscribe if no subscribable server or, add a CREATE SERVER button, like in 4.x\n");			return;		}	}	SetUpServerMenu();	SetUpTree(false);    gNameField.focus();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/71e1ffab7041d706ecdcfdbf01b42232fdf44f36/subscribe.js/buggy/mailnews/base/resources/content/subscribe.js