OK here's a
working online demo for you, using more or less that code. I changed it so the thumbnails and big image are the same image, just resized using attributes in the img tag - that way the big images are already loaded when you mouseover, so there's no waiting if the images are big.
You could easily add in a default image for rollouts, just by having onMouseOut="imageSwap('default');"
Another point, if the images are down the page, then you may find that on activation of the js, it flicks back up to the top. To stop this add "return false;" like below:
onMouseOver="imageswap('image1');return false;"