rem: doSetOKCancel(onOK, null); 
add: doSetOKCancel(onOK, onCancel); 
context: function Startup(){  if (!InitEditorShell())    return;  dialog = new Object;  if (!dialog)  {    dump("Failed to create dialog object!!!\n");    window.close();  }  dialog.ColorPreview = document.getElementById("ColorPreview");  dialog.NormalText = document.getElementById("NormalText");  dialog.LinkText = document.getElementById("LinkText");  dialog.ActiveLinkText = document.getElementById("ActiveLinkText");  dialog.VisitedLinkText = document.getElementById("VisitedLinkText");  dialog.DefaultColorsRadio = document.getElementById("DefaultColorsRadio");  dialog.CustomColorsRadio = document.getElementById("CustomColorsRadio");  dialog.BackgroundImageInput = document.getElementById("BackgroundImageInput");  BodyElement = editorShell.editorDocument.body;  if (!BodyElement)  {    dump("Failed to get BODY element!\n");    window.close();  }  dump(BodyElement+"\n");  // Set element we will edit  globalElement = BodyElement.cloneNode(false);  doSetOKCancel(onOK, null);  // Initialize default colors from browser prefs  var prefs = GetPrefs();  if (prefs)  {    dump("Getting browser prefs...\n");    // This doesn't necessarily match what appears in the page    // It is complicated by browser.display.use_document_colors    // TODO: WE MUST FORCE WINDOW TO USE DOCUMENT COLORS!!!    //       How do we do that without changing browser prefs?    var useDocumentColors =    prefs.GetBoolPref("browser.display.use_document_colors");    dump("browser.display.use_document_colors = "+ useDocumentColors+"\n");    if (useDocumentColors)    {      // How do I get current colors as show in page?    } else {      try {        // Use author's browser pref colors        defaultTextColor =         prefs.CopyCharPref("browser.display.foreground_color");        defaultLinkColor =         prefs.CopyCharPref("browser.anchor_color");        // Note: Browser doesn't store a value for ActiveLinkColor        defaultVisitedLinkColor =  prefs.CopyCharPref("browser.visited_color");        defaultBackgroundColor=    prefs.CopyCharPref("browser.display.background_color");      }      catch (ex) {        dump("Failed getting browser colors from prefs\n");      }    }    try {      // Get the last-set background image      lastSetBackgroundImage = prefs.CopyCharPref("editor.default_background_image");    }    catch (ex) {      dump("Failed getting browser colors from prefs\n");    }  }  InitDialog();  if (dialog.DefaultColorsRadio.checked)    dialog.DefaultColorsRadio.focus();  else    dialog.CustomColorsRadio.focus();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/5eafc0feeb5eafc3a8dec8ecd2e935e7be206733/EdColorProps.js/buggy/editor/ui/dialogs/content/EdColorProps.js