msgWindow.rootDocShell.appType = Components.interfaces.nsIDocShell.APP_TYPE_MAIL; 
function SubscribeOnLoad(){  //dump("SubscribeOnLoad()\n");  gSubscribeBundle = document.getElementById("bundle_subscribe");  gMessengerBundle = document.getElementById("bundle_messenger");	  gSubscribeTree = document.getElementById("subscribeTree");  gSearchTree = document.getElementById("searchTree");  gSearchTreeBoxObject = document.getElementById("searchTree").treeBoxObject;  gNameField = document.getElementById("namefield");  gNameFieldLabel = document.getElementById("namefieldlabel");  gSubscribeDeck = document.getElementById("subscribedeck");  msgWindow = Components.classes[msgWindowContractID].createInstance(Components.interfaces.nsIMsgWindow);  msgWindow.domWindow = window;    msgWindow.statusFeedback = gStatusFeedback;  msgWindow.rootDocShell.allowAuth = true;	// 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, true);		//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();}
5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5872/6ff991e2898ef85a2e184b23165faa229a6e4a28/subscribe.js/clean/mailnews/base/resources/content/subscribe.js