rem:    if (StartupCalled) { dump("*** CALLING IMAGE DIALOG Startup() AGAIN! ***\n"); return; } StartupCalled = true;  
context: function Startup(){  //XXX Very weird! When calling this with an existing image,  //    we get called twice. That causes dialog layout  //    to explode to fullscreen!  if (StartupCalled)  {    dump("*** CALLING IMAGE DIALOG Startup() AGAIN! ***\n");    return;  }  StartupCalled = true;  if (!InitEditorShell())    return;  ImageStartup();  // Get a single selected image element  var tagName = "img";  if ("arguments" in window && window.arguments[0])  {    imageElement = window.arguments[0];  }  else  {    // First check for <input type="image">    imageElement = editorShell.GetSelectedElement("input");    if (!imageElement || imageElement.getAttribute("type") != "image")      // Get a single selected image element      imageElement = editorShell.GetSelectedElement(tagName);  }  if (imageElement)  {    // We found an element and don't need to insert one    if (imageElement.hasAttribute("src"))    {      gInsertNewImage = false;      actualWidth  = imageElement.naturalWidth;      actualHeight = imageElement.naturalHeight;    }  }  else  {    gInsertNewImage = true;    // We don't have an element selected,    //  so create one with default attributes    imageElement = editorShell.CreateElementWithDefaults(tagName);    if (!imageElement)    {      dump("Failed to get selected element or create a new one!\n");      window.close();      return;    }  }  // Make a copy to use for AdvancedEdit  globalElement = imageElement.cloneNode(false);  // We only need to test for this once per dialog load  gHaveDocumentUrl = GetDocumentBaseUrl();  InitDialog();  // Save initial source URL  gOriginalSrc = gDialog.srcInput.value;  // By default turn constrain on, but both width and height must be in pixels  gDialog.constrainCheckbox.checked =    gDialog.widthUnitsMenulist.selectedIndex == 0 &&    gDialog.heightUnitsMenulist.selectedIndex == 0;  SetTextboxFocus(gDialog.srcInput);  SetWindowLocation();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/b9e6e4b28f24c1ed9f85bf758d559ed1313505d2/EdImageProps.js/clean/editor/ui/dialogs/content/EdImageProps.js