This example improves on the previous one by using a function to swap the images. But see the better example using CSS.