add:   globalElement = imageElement.cloneNode(false); 
context: function Startup(){  if (!InitEditorShell())    return;  doSetOKCancel(onOK, null);  // Create dialog object to store controls for easy access  dialog                                = new Object;  // This is the "combined" widget:  dialog.srcInput                       = document.getElementById("image.srcInput");  dialog.altTextInput                   = document.getElementById("image.altTextInput");  dialog.MoreFewerButton                = document.getElementById("MoreFewerButton");  dialog.MoreRow                        = document.getElementById("MoreRow");  dialog.customsizeRadio                = document.getElementById( "customsizeRadio" );  dialog.imagewidthInput                = document.getElementById( "imagewidthInput" );  dialog.imageheightInput               = document.getElementById( "imageheightInput" );    dialog.imagelrInput                   = document.getElementById( "imageleftrightInput" );  dialog.imagetbInput                   = document.getElementById( "imagetopbottomInput" );  dialog.imageborderInput               = document.getElementById( "imageborderInput" );  // Start in the mode initialized in the "doSeeAll" var above  // THIS IS NOT WORKING NOW - After switching to "basic" mode,  // then back to   if (doSeeAll) {    dialog.MoreRow.style.visibility     = "inherit"; // visible  } else {    dialog.MoreRow.style.visibility     = "hidden"; // collapse  }  if (null == dialog.srcInput ||       null == dialog.altTextInput )  {    dump("Not all dialog controls were found!!!\n");  }        // Get a single selected image element  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    dump("Element not selected - calling createElementWithDefaults\n");    imageElement                        = editorShell.CreateElementWithDefaults(tagName);    if( !imageElement )    {      dump("Failed to get selected element or create a new one!\n");      window.close();    }    }    // Initialize all widgets with image attributes  InitDialog();    dialog.srcInput.focus();}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/dd1fea4e79dd1eac8c26058ce95c469c8fa645eb/EdImageProps.js/buggy/editor/ui/dialogs/content/EdImageProps.js