You can program this in ImageReady and/or Fireworks, but in general, it's just using Javascript for it... Let's see if I can find a link, so I don't have to write it all out...
ahhh... Here we go! This link will get you close.
http://www.echoecho.com/jsbuttons.htm
With out checking it, I think that all you should have to do is rename the image you want to change, not the one you are rolling over. And then call the function with that name.
Hope it works!