rem: if ( SeeMore ) InitDialog();  
context: function Startup(){  if (!InitEditorShell())    return;  doSetOKCancel(onOK, onCancel);  // Create dialog object to store controls for easy access  dialog = new Object;  dialog.srcInput          = document.getElementById( "srcInput" );  dialog.altTextInput      = document.getElementById( "altTextInput" );  dialog.MoreFewerButton   = document.getElementById( "MoreFewerButton" );  dialog.AdvancedEditButton = document.getElementById( "AdvancedEditButton" );  dialog.AdvancedEditButton2 = document.getElementById( "AdvancedEditButton2" );  dialog.MoreSection       = document.getElementById( "MoreSection" );  dialog.customsizeRadio   = document.getElementById( "customsizeRadio" );  dialog.originalsizeRadio = document.getElementById( "originalsizeRadio" );  dialog.constrainCheckbox = document.getElementById( "constrainCheckbox" );  dialog.widthInput        = document.getElementById( "widthInput" );  dialog.heightInput       = document.getElementById( "heightInput" );  dialog.widthUnitsMenulist   = document.getElementById( "widthUnitsMenulist" );  dialog.heightUnitsMenulist  = document.getElementById( "heightUnitsMenulist" );  dialog.imagelrInput      = document.getElementById( "imageleftrightInput" );  dialog.imagetbInput      = document.getElementById( "imagetopbottomInput" );  dialog.border            = document.getElementById( "border" );  dialog.alignTypeSelect   = document.getElementById( "alignTypeSelect" );  dialog.editImageMap      = document.getElementById( "editImageMap" );  dialog.removeImageMap    = document.getElementById( "removeImageMap" );  dialog.doConstrain = false;  dialog.isCustomSize = false;    // 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    insertNew = false;  }   else  {    insertNew = 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();    }    }  // Make a copy to use for AdvancedEdit  globalElement = imageElement.cloneNode(false);    // Get image map for image  var usemap = globalElement.getAttribute("usemap");  if (usemap)  {    mapname = usemap.substring(1, usemap.length);    mapCollection = editorShell.editorDocument.getElementsByName(mapname);    if (mapCollection[0] != null)    {      imageMap = mapCollection[0];      globalMap = imageMap;      canRemoveImageMap = true;      insertNewIMap = false;      dump(imageMap.childNodes.length+"\n");    }    else    {      insertNewIMap = true;      globalMap = null;    }  }  else  {    insertNewIMap = true;    globalMap = null;  }  // Set SeeMore bool to the OPPOSITE of the current state,  //   which is automatically saved by using the 'persist="more"'   //   attribute on the MoreFewerButton button  //   onMoreFewerImage will toggle the state and redraw the dialog  SeeMore = (dialog.MoreFewerButton.getAttribute("more") != "1");  // Initialize widgets with image attributes in the case where the entire dialog isn't visible  if ( SeeMore ) // this is actually in the opposite state until onMoreFewerImage is called below    InitDialog();    onMoreFewerImage();  // this call will initialize all widgets if entire dialog is visible  SetTextfieldFocus(dialog.srcInput);  SetWindowLocation();}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/ac8f8cdc5a12cf45af0644ba140db853faaec07b/EdImageProps.js/buggy/editor/ui/dialogs/content/EdImageProps.js