Changing an image src

Changing an image src

Hey All,

I have the following code
  1. <img src="/filename.ext" id="homeimg" width="623" height="410" alt="" />
Under it i also have the following
  1. <ul class="moreimages">
  2.       <li><a href="/more-image-button.png"><img src="/image.png" alt="" /></a></li>
  3.       <li><a href="/more-image-button.png"><img src="/image.png" alt="" /></a></li>
  4. </ul>
What i want to be able to do, is when someone clicks a link, it changes the main image src to the href of the link if that makes sense.

So, when someone clicks a link the image tag changes to <img src="/more-image-button.png" id="homeimg" ... />

Cheers,