rem: case DisplayModeNormal: 
add: case gDisplayModeNormal: 
context: function SetDisplayMode(mode){  if (!isHTMLEditor())    return false;  // 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  var selectedTab = null;  if (mode == DisplayModePreview) selectedTab = gPreviewModeButton;  if (mode == DisplayModeNormal) selectedTab = gNormalModeButton;  if (mode == DisplayModeAllTags) selectedTab = gTagModeButton;  if (mode == DisplayModeSource) selectedTab = gSourceModeButton;  if (selectedTab)    document.getElementById("EditModeTabs").selectedItem = selectedTab;  if (mode == DisplayModeSource)  {    // Switch to the sourceWindow (second in the deck)    gContentWindowDeck.setAttribute("selectedIndex","1");    //Hide the formatting toolbar if not already hidden    gFormatToolbarHidden = gFormatToolbar.getAttribute("hidden");    if (gFormatToolbarHidden != "true")    {      gFormatToolbar.setAttribute("hidden", "true");    }    gSourceContentWindow.focus();  }  else  {    // Switch to the normal editor (first in the deck)    gContentWindowDeck.setAttribute("selectedIndex","0");    // Restore menus and toolbars    if (gFormatToolbarHidden != "true")    {      gFormatToolbar.setAttribute("hidden", gFormatToolbarHidden);    }    gContentWindow.focus();  }  // update commands to disable or re-enable stuff  window.updateCommands("mode_switch");  // We must set check on menu item since toolbar may have been used  document.getElementById("viewPreviewMode").setAttribute("checked","false");  document.getElementById("viewNormalMode").setAttribute("checked","false");  document.getElementById("viewAllTagsMode").setAttribute("checked","false");  document.getElementById("viewSourceMode").setAttribute("checked","false");  var menuID;  switch(mode)  {    case DisplayModePreview:      menuID = "viewPreviewMode";      break;    case DisplayModeNormal:      menuID = "viewNormalMode";      break;    case DisplayModeAllTags:      menuID = "viewAllTagsMode";      break;    case DisplayModeSource:      menuID = "viewSourceMode";      break;  }  if (menuID)    document.getElementById(menuID).setAttribute("checked","true");  return true;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/899ec31c997d937c47c31f707df5f5bf9cc25361/editor.js/buggy/editor/ui/composer/content/editor.js