title: Changing source of image with an image of different size, won't resize in IE
body: <p><br>
  I'm trying to create a very simple gallery using javascript. There are thumbnails, and when they're clicked the big image's source gets updated. Everything works fine, except when I try it in IE the images' size stays the same as the inital image's size was. Let's say initial image is 200x200 and I click on a thumbnail of a 100x100 image, the image is displayed but it is streched to 200x200. I don't set any width or height values, so I guess the browser should use image's normal size, and so does for example FF.</p>
  
  <p>here's some code:</p>
  
  <pre><code>function showBigImage(link)
  {
   var source = link.getAttribute("href");
   var bigImage = document.getElementById("bigImage");
   bigImage.setAttribute("src", source);
   return false; /* prevent normal behaviour of &lt;a&gt; element when clicked */
  }
  </code></pre>
  
  <p>and html looks like this:</p>
  
  <pre><code>&lt;ul id="gallery"&gt;
   &lt;li&gt;
    &lt;a href="images/gallery/1.jpg"&gt;
     &lt;img src="images/gallery/1thumb.jpg"&gt;
    &lt;/a&gt;
   &lt;/li&gt;
      (more &lt;li&gt; elements ...)
  &lt;/ul&gt;
  </code></pre>
  
  <p>the big image is created dynamically:</p>
  
  <pre><code>function createBigImage()
  {
   var bigImage = document.createElement("img");
   bigImage.setAttribute("id", "bigImage");
   bigImage.setAttribute("src", "images/gallery/1.jpg");
  
   var gal = document.getElementById("gallery");
   var gal_parent = gal.parentNode;
   gal_parent.insertBefore(bigImage, gal);
  }
  </code></pre>
  
  <p>There's also some code setting the onclick events on the links, but I don't think it's relevant in this situaltion. As I said the problem is only with IE. Thanks in advance!</p>