rem: bv = bv.substr(0, pxIndex); 
add: bv = RegExp.leftContext; 
context: function InitImage(){  // Set the controls to the image's attributes  gDialog.srcInput.value = globalElement.getAttribute("src");  // Set "Relativize" checkbox according to current URL state  SetRelativeCheckbox();  // Force loading of image from its source and show preview image  LoadPreviewImage();  var hasAltText = globalElement.hasAttribute("alt");  if (hasAltText)    gDialog.altTextInput.value = globalElement.getAttribute("alt");  if (gInsertNewImage || !hasAltText || (hasAltText && gDialog.altTextInput.value))  {    SetAltTextDisabled(false);    gDialog.altTextRadioGroup.selectedItem = gDialog.altTextRadio;  }  else  {    SetAltTextDisabled(true);    gDialog.altTextRadioGroup.selectedItem = gDialog.noAltTextRadio;  }  // setup the height and width widgets  var width = InitPixelOrPercentMenulist(globalElement,                    gInsertNewImage ? null : imageElement,                    "width", "widthUnitsMenulist", gPixel);  var height = InitPixelOrPercentMenulist(globalElement,                    gInsertNewImage ? null : imageElement,                    "height", "heightUnitsMenulist", gPixel);  // Set actual radio button if both set values are the same as actual  SetSizeWidgets(width, height);  gDialog.widthInput.value  = gConstrainWidth = width ? width : (gActualWidth ? gActualWidth : "");  gDialog.heightInput.value = gConstrainHeight = height ? height : (gActualHeight ? gActualHeight : "");  // set spacing editfields  gDialog.imagelrInput.value = globalElement.getAttribute("hspace");  gDialog.imagetbInput.value = globalElement.getAttribute("vspace");  // dialog.border.value       = globalElement.getAttribute("border");  var bv = GetHTMLOrCSSStyleValue(globalElement, "border", "border-top-width");  var pxIndex = bv.search(/px/);  if (pxIndex  > 0)  {    // Strip out the px    bv = bv.substr(0, pxIndex);  }  else if (bv == "thin")  {    bv = "1";  }  else if (bv == "medium")  {    bv = "3";  }  else if (bv == "thick")  {    bv = "5";  }  gDialog.border.value = bv;  // Get alignment setting  var align = globalElement.getAttribute("align");  if (align)    align = align.toLowerCase();  var imgClass;  var textID;  switch ( align )  {    case "top":    case "middle":    case "right":    case "left":      gDialog.alignTypeSelect.value = align;      break;    default:  // Default or "bottom"      gDialog.alignTypeSelect.value = "bottom";  }  // Get image map for image  gImageMap = GetImageMap();  doOverallEnabling();  doDimensionEnabling();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/5657e3afe3e96ad5660dc13ce1a379a9cdf214ae/EdImageOverlay.js/buggy/editor/ui/dialogs/content/EdImageOverlay.js