function resizeImage_Interactive(imageRef, maxWidth, maxHeight) 
  { 
  var imageHeight; 
  var imageWidth; 

  imageHeight=imageRef.offsetHeight;
  imageWidth = imageRef.offsetWidth;
  if (imageHeight>imageWidth)
    {
    if (imageHeight< maxHeight)
      {
      alert("The image specified has height less than that suggested (279 pixels).  It will not be scaled.");
      }
    else
      {
      imageRef.style.pixelHeight = maxHeight;
      }
    }
  else
    {
    if (imageWidth < maxWidth)
      {
      alert("The image specified has width less than that suggested (225 pixels).  It will not be scaled.");
      }
    else
      {
      imageRef.style.pixelWidth = maxWidth;
      }
    }
  } // resizeImage_Interactive



function resizeImage(imageRef, maxWidth, maxHeight) 
  { 
  var imageHeight; 
  var imageWidth; 

  imageHeight=imageRef.offsetHeight;
  imageWidth = imageRef.offsetWidth;
  // uncomment to debug your script- alert ("image w/h: " + imageWidth + "/" + imageHeight + " " +  "maxs w/h: " + maxWidth + "/" + maxHeight);
  if (imageHeight > imageWidth)
    {
    if (imageHeight > maxHeight)
      imageRef.style.pixelHeight = maxHeight;
    }
  else
    {
    if (imageWidth > maxWidth)
      imageRef.style.pixelWidth = maxWidth;
    }
  } // resizeImage
