rem: dialog.pixelOrPercentButton = document.getElementById("pixelOrPercentButton"); 
context: function Startup(){  // get the editor shell from the parent window  editorShell = window.opener.editorShell;  editorShell = editorShell.QueryInterface(Components.interfaces.nsIEditorShell);  if(!editorShell) {    dump("editorShell not found!!!\n");    window.close();    return;  }  // Get the selected horizontal line  hLineElement = window.editorShell.GetSelectedElement(tagName);  if (!hLineElement) {    // We should never be here if not editing an existing HLine    dump("HLine is not selected! Shouldn't be here!\n");    window.close();    return;  }  // Create a temporary element to use with Save Settings as default  tempLineElement = window.editorShell.editorDocument.createElement("HR");  if (!hLineElement) {    dump("Temporary HLine element was not created!\n");    window.close();    return;  }  // Create dialog object to store controls for easy access  dialog = new Object;  dialog.heightInput = document.getElementById("height");  dialog.widthInput = document.getElementById("width");  dialog.leftAlign = document.getElementById("leftAlign");  dialog.centerAlign = document.getElementById("centerAlign");  dialog.rightAlign = document.getElementById("rightAlign");  dialog.shading = document.getElementById("3dShading");  dialog.pixelOrPercentButton = document.getElementById("pixelOrPercentButton");  // Initialize control values based on existing attributes    // Just to be confusing, "size" is used instead of height    // We will use "height" here and in UI  dialog.heightInput.value = hLineElement.getAttribute("size");  width = hLineElement.getAttribute("width");  // This assumes initial button text is "percent"  // Search for a "%" character  percentIndex = width.search(/%/);  if (percentIndex > 0) {    percentChar = "%";    // Strip out the %    width = width.substr(0, percentIndex);  } else {    dialog.pixelOrPercentButton.setAttribute("value","pixels");  }  dialog.widthInput.value = width;  align = hLineElement.getAttribute("align");  if (align == "center") {    dialog.centerAlign.checked = true;  } else if (align == "right") {    dialog.rightAlign.checked = true;  } else {    dialog.leftAlign.checked = true;  }  noshade = hLineElement.getAttribute("noshade");  dialog.shading.checked = (noshade == "");  // SET FOCUS TO FIRST CONTROL  dialog.heightInput.focus();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/8f1b0f0e2f48f83a0ca1fc5b895d4b1c08312577/EdHLineProps.js/clean/editor/ui/dialogs/content/EdHLineProps.js