Hello all-

I just noticed an issue on my site where my image resizing code does not appear to be working correctly in IE7. The code that I'm using is:

Code:
<script type="text/javascript">
function setImageDimensions(gotImage)
{ 
if(gotImage.width > 500) {
    gotImage.width = 500;
  }
}
function changeImageDimensions(gotImage, type)
{
  if(gotImage.width > 500 && type == 'out') {
    gotImage.width = 500;
    return;
  }
  if(type == 'over') {
    gotImage.removeAttribute('width');
  }
}
</script>
And I'm calling each image using:

Code:
<img onload="setImageDimensions(this)" src="http://i116.photobucket.com/albums/o13/scrapncathy/Katie-BeauXmas06.jpg" border="0" />
It appears to be working just fine in other browsers and I'm not exactly sure what I'm doing wrong. My desired result is to automatically change the width of the images to 500px if they are initially wider than that.

Thank you so much for your help.

EDIT - just realized that it's not working in IE 6 either...