rem: if (useHtml) editorAppCore.loadUrl("chrome: else editorAppCore.loadUrl("chrome: 
context: function ComposeStartup(){	dump("Compose: StartUp\n");	var sessionID;	var appCoreName;	// Get arguments	var args = GetArgs();	// Generate a unique number, do we have a better way?	var date = new Date();	sessionID = date.getTime() + Math.random();	//Creating or Getting the Compose AppCore	if (args.name)	{		appCoreName = args.name;		dump("Compose: get composeAppCore=" + args.name + "\n");	}	else		appCoreName = "ComposeAppCore:" + sessionID;	composeAppCore = XPAppCoresManager.Find(appCoreName);	if (! composeAppCore)	{		dump("creating ComposeAppCore...\n");		composeAppCore = new ComposeAppCore();		if (composeAppCore)		{			composeAppCore.Init(appCoreName);			dump("compose app core (" + sessionID + ") correctly added to app cores manager\n");		}	}	if (composeAppCore)	{		dump("initalizing the compose app core\n");		composeAppCore.SetWindow(window);		composeAppCore.CompleteCallback("MessageSent();");	}	//Creating a Editor AppCore	appCoreName = "EditorAppCore:" + sessionID;	editorAppCore = XPAppCoresManager.Find(appCoreName);		dump("Looking up EditorAppCore...\n");	if (! editorAppCore)	{		dump("Creating EditorAppCore...\n");		editorAppCore = new EditorAppCore();		if (editorAppCore)		{			editorAppCore.Init(appCoreName);			dump("editor app core (" + sessionID + ") correctly added to app cores manager\n");		}	}	else		dump("Editor Appcore has been already created, something wrong here!!!");	if (editorAppCore)	{		dump("initalizing the editor app core\n");		EditorSetup(appCoreName, editorAppCore); //defined into EditorCommands.js		// setEditorType MUST be call before setContentWindow		var useHtml;		if (args.editorType)		{			switch(args.editorType.toLowerCase())			{				case "text": useHtml = false;		break;				case "html": useHtml = true;		break;								case "default":				default:					if (composeAppCore)						useHtml = composeAppCore.useHtml;					break;			}		}		else		{			if (composeAppCore)				useHtml = composeAppCore.useHtml;		}				if (useHtml)		{			editorAppCore.setEditorType("html");			dump("editor initialized in HTML mode\n");		}		else		{			editorAppCore.setEditorType("text");			dump("editor initialized in PLAIN TEXT mode\n");		}		editorAppCore.setContentWindow(window.frames[0]);		editorAppCore.setWebShellWindow(window);		editorAppCore.setToolbarWindow(window);		if (useHtml)			editorAppCore.loadUrl("chrome://messengercompose/content/defaultHtmlBody.html");		else			editorAppCore.loadUrl("chrome://messengercompose/content/defaultTextBody.html");		// Now that we have an Editor AppCore, we can finish to initialize the Compose AppCore		if (composeAppCore)		{			dump("Finish Initialization of the compose appcore\n");			editorAppCore.wrapColumn = composeAppCore.wrapColumn;			composeAppCore.SetEditor(editorAppCore);			composeAppCore.useHtml = useHtml;		}	}}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/bf3286e754dafac5249494aa3360f7495652c589/MsgComposeCommands.js/clean/mailnews/ui/compose/resources/MsgComposeCommands.js