rem: */ 
add:  SetViewMenuForHTMLSource(false);  
context: function SetDisplayMode(mode){  if (gIsHTMLEditor)  {    // Already in requested mode:    //  return false to indicate we didn't switch    if (mode == gEditorDisplayMode)      return false;    gEditorDisplayMode = mode;    // Save the last non-source mode so we can cancel source editing easily    if (mode != DisplayModeSource)      PreviousNonSourceDisplayMode = mode;        // Editorshell does the style sheet loading/unloading    editorShell.SetDisplayMode(mode);    // Set the UI states    gPreviewModeButton.setAttribute("selected",Number(mode == DisplayModePreview));    gNormalModeButton.setAttribute("selected",Number(mode == DisplayModeNormal));    gTagModeButton.setAttribute("selected",Number(mode == DisplayModeAllTags));    gSourceModeButton.setAttribute("selected", Number(mode == DisplayModeSource));    if (mode == DisplayModeSource)    {      // Switch to the sourceWindow (second in the deck)      gContentWindowDeck.setAttribute("index","1");      // Hide menus that are completely disabled      // Note: ShowMenuItem is implemented in EditorContextMenu.js      ShowMenuItem("editMenu", false);      ShowMenuItem("viewMenu", false);      ShowMenuItem("insertMenu", false);      ShowMenuItem("formatMenu", false);      ShowMenuItem("tableMenu", false);/*      CollapseItem("editMenu", true);      CollapseItem("viewMenu", true);      CollapseItem("insertMenu", true);      CollapseItem("formatMenu", true);      CollapseItem("tableMenu", true);*/      DisableItem("findButton", true);      DisableItem("spellingButton", true);      DisableItem("imageButton", true);      DisableItem("hlineButton", true);      DisableItem("tableButton", true);      DisableItem("linkButton", true);      DisableItem("namedAnchorButton", true);      //Hide the formating toolbar if not already hidden      gFormatToolbarHidden = gFormatToolbar.getAttribute("hidden");      if (gFormatToolbarHidden != "true")      {        gFormatToolbar.setAttribute("hidden", "true");      }      // THIS DOESN'T WORK!      gSourceContentWindow.focus();    }    else     {      // Switch to the normal editor (first in the deck)      gContentWindowDeck.setAttribute("index","0");      // Restore menus and toolbars      ShowMenuItem("editMenu", true);      ShowMenuItem("viewMenu", true);      ShowMenuItem("insertMenu", true);      ShowMenuItem("formatMenu", true);      ShowMenuItem("tableMenu", true);/*      CollapseItem("editMenu", false);      CollapseItem("viewMenu", false);      CollapseItem("insertMenu", false);      CollapseItem("formatMenu", false);      CollapseItem("tableMenu", false);*/      DisableItem("findButton", false);      DisableItem("spellingButton", false);      DisableItem("imageButton", false);      DisableItem("hlineButton", false);      DisableItem("tableButton", false);      DisableItem("linkButton", false);      DisableItem("namedAnchorButton", false);      if (gFormatToolbarHidden != "true")      {dump("Switching back to visible toolbar. gFormatToolbarHidden = "+gFormatToolbarHidden+"\n");        gFormatToolbar.setAttribute("hidden", gFormatToolbarHidden);      }      window._content.focus();    }    return true;  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/479cdf9bee53a626b49edd03f09f338a47d8ca5b/editor.js/clean/editor/ui/composer/content/editor.js