"chrome,modal",
"chrome,modal,titlebar",
openWindow(nsIMsgWindow *aMsgWindow, const char *chromeURL, nsIDialogParamBlock *ioParamBlock) {    nsresult rv;	if (!aMsgWindow) return NS_ERROR_NULL_POINTER;	nsCOMPtr<nsIDocShell> docShell;	rv = aMsgWindow->GetRootDocShell(getter_AddRefs(docShell));    if (NS_FAILED(rv)) return rv;	NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE);   	nsCOMPtr<nsIScriptGlobalObjectOwner> globalObjectOwner(do_QueryInterface(docShell));	NS_ENSURE_TRUE(globalObjectOwner, NS_ERROR_FAILURE);	nsCOMPtr<nsIScriptGlobalObject> globalObject;	globalObjectOwner->GetScriptGlobalObject(getter_AddRefs(globalObject));	NS_ENSURE_TRUE(globalObject, NS_ERROR_FAILURE);	nsCOMPtr<nsIDOMWindow> parentWindow(do_QueryInterface(globalObject));	NS_ENSURE_TRUE(parentWindow, NS_ERROR_FAILURE);    nsCOMPtr<nsIScriptContext> context;    globalObject->GetContext( getter_AddRefs( context ) );    if (!context) return NS_ERROR_FAILURE;    JSContext *jsContext = (JSContext*)context->GetNativeContext();        void *stackPtr;    jsval *argv = JS_PushArguments( jsContext,                                    &stackPtr,                                    "sss%ip",                                    chromeURL,                                    "_blank",                                    "chrome,modal",                                    (const nsIID*)(&NS_GET_IID(nsIDialogParamBlock)),                                     (nsISupports*)ioParamBlock);    if (!argv) {        return NS_ERROR_FAILURE;    }    nsCOMPtr<nsIDOMWindow> dialogWindow;    rv = parentWindow->OpenDialog(jsContext,                                  argv,                                  4,                                  getter_AddRefs(dialogWindow));    JS_PopArguments( jsContext, stackPtr );    return rv;}       