rem: width = ValidateNumber(gDialog.widthInput, gDialog.widthUnitsMenulist, 1, maxPixels, 
add: width = ValidateNumber(gDialog.widthInput, gDialog.widthUnitsMenulist, 1, gMaxPixels, 
context: function ValidateImage(){  gValidateTab = gDialog.tabLocation;  if (!gDialog.srcInput.value)  {    AlertWithTitle(null, GetString("MissingImageError"));    SwitchToValidatePanel();    gDialog.srcInput.focus();    return false;  }  //TODO: WE NEED TO DO SOME URL VALIDATION HERE, E.G.:  // We must convert to "file:///" or "http://" format else image doesn't load!  var src = TrimString(gDialog.srcInput.value);  globalElement.setAttribute("src", src);  // Force user to enter Alt text only if "Alternate text" radio is checked  // Don't allow just spaces in alt text  var alt = "";  var useAlt = gDialog.altTextRadioGroup.selectedItem == gDialog.altTextRadio;  if (useAlt)    alt = TrimString(gDialog.altTextInput.value);  if (gDoAltTextError && useAlt && !alt)  {    AlertWithTitle(null, GetString("NoAltText"));    SwitchToValidatePanel();    gDialog.altTextInput.focus();    return false;  }  globalElement.setAttribute("alt", alt);  var width = "";  var height = "";  gValidateTab = gDialog.tabDimensions;  if (!gDialog.actualSizeRadio.selected)  {    // Get user values for width and height    width = ValidateNumber(gDialog.widthInput, gDialog.widthUnitsMenulist, 1, maxPixels,                            globalElement, "width", false, true);    if (gValidationError)      return false;    height = ValidateNumber(gDialog.heightInput, gDialog.heightUnitsMenulist, 1, maxPixels,                             globalElement, "height", false, true);    if (gValidationError)      return false;  }  // We always set the width and height attributes, even if same as actual.  //  This speeds up layout of pages since sizes are known before image is loaded  if (!width)    width = gActualWidth;  if (!height)    height = gActualHeight;  // Remove existing width and height only if source changed  //  and we couldn't obtain actual dimensions  var srcChanged = (src != gOriginalSrc);  if (width)    globalElement.setAttribute("width", width);  else if (srcChanged)    globalElement.removeAttribute("width");  if (height)    globalElement.setAttribute("height", height);  else if (srcChanged)     globalElement.removeAttribute("height");  // spacing attributes  gValidateTab = gDialog.tabBorder;  ValidateNumber(gDialog.imagelrInput, null, 0, maxPixels,                  globalElement, "hspace", false, true, true);  if (gValidationError)    return false;  ValidateNumber(gDialog.imagetbInput, null, 0, maxPixels,                  globalElement, "vspace", false, true);  if (gValidationError)    return false;  // note this is deprecated and should be converted to stylesheets  ValidateNumber(gDialog.border, null, 0, maxPixels,                  globalElement, "border", false, true);  if (gValidationError)    return false;  // Default or setting "bottom" means don't set the attribute  // Note that the attributes "left" and "right" are opposite  //  of what we use in the UI, which describes where the TEXT wraps,  //  not the image location (which is what the HTML describes)  switch ( gDialog.alignTypeSelect.value )  {    case "top":    case "middle":    case "right":    case "left":      globalElement.setAttribute( "align", gDialog.alignTypeSelect.value );      break;    default:      globalElement.removeAttribute( "align" );  }  return true;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/4b5a2175a59707099daeda42fb19f1d1c6dd398f/EdImageOverlay.js/clean/editor/ui/dialogs/content/EdImageOverlay.js