function setImages()
{
  var theContainer = document.getElementById('imgEntry');

  if (theContainer)
  {
    // Find all images
    var imgs = theContainer.getElementsByTagName('img');
  
    // Hack - IE is stupid - need to turn off all images to allow it to shrink, then I can set the size and turn them back on
    for(i = 0; i < imgs.length; i++)
    {
      imgs[i].style.display = "none";
    }
  
    for(i = 0; i < imgs.length; i++)
    {
      var imgParent = imgs[i].parentNode;
  
      // Get the width from the parent
      var parentWidth = imgParent.offsetWidth;
  
      if (parentWidth < imgs[i].width)
        imgs[i].width = parentWidth - 20;
  
      imgs[i].style.display = "block";
    }
  }
}

event.observe(window, 'load', setImages);