rem:  doSetOKCancel(onOK, onCancel); 
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;  doSetOKCancel(onOK, onCancel);  gDialog.srcInput          = document.getElementById( "srcInput" );  gDialog.altTextInput      = document.getElementById( "altTextInput" );  gDialog.MoreFewerButton   = document.getElementById( "MoreFewerButton" );  gDialog.MoreSection       = document.getElementById( "MoreSection" );  gDialog.customSizeRadio   = document.getElementById( "customSizeRadio" );  gDialog.actualSizeRadio   = document.getElementById( "actualSizeRadio" );  gDialog.constrainCheckbox = document.getElementById( "constrainCheckbox" );  gDialog.widthInput        = document.getElementById( "widthInput" );  gDialog.heightInput       = document.getElementById( "heightInput" );  gDialog.widthUnitsMenulist   = document.getElementById( "widthUnitsMenulist" );  gDialog.heightUnitsMenulist  = document.getElementById( "heightUnitsMenulist" );  gDialog.imagelrInput      = document.getElementById( "imageleftrightInput" );  gDialog.imagetbInput      = document.getElementById( "imagetopbottomInput" );  gDialog.border            = document.getElementById( "border" );  gDialog.alignTypeSelect   = document.getElementById( "alignTypeSelect" );  gDialog.ImageHolder       = document.getElementById( "preview-image-holder" );  gDialog.PreviewWidth      = document.getElementById( "PreviewWidth" );  gDialog.PreviewHeight     = document.getElementById( "PreviewHeight" );  gDialog.PreviewSize       = document.getElementById( "PreviewSize" );  gDialog.PreviewImage      = null;  // Get a single selected image element  var tagName = "img"  imageElement = editorShell.GetSelectedElement(tagName);  if (imageElement)  {    // We found an element and don't need to insert one    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;  // Set SeeMore bool to the OPPOSITE of the current state,  //   which is automatically saved by using the 'persist="more"'  //   attribute on the MoreFewerButton button  //   onMoreFewer will toggle the state and redraw the dialog  SeeMore = (gDialog.MoreFewerButton.getAttribute("more") != "1");  // Initialize widgets with image attributes in the case where the entire dialog isn't visible  onMoreFewer();  SetTextboxFocus(gDialog.srcInput);  SetWindowLocation();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/71e1ffab7041d706ecdcfdbf01b42232fdf44f36/EdImageProps.js/clean/editor/ui/dialogs/content/EdImageProps.js