Lots and lots of ways to do this! You can use
CSS rollovers if you feel like being adventurous. If you're just after a straightforward Javascript example.. here's one that I've used in the past. Obviously, you're going to need two images.. one will be your "hover" image, the other your regular image that will be there initially and "onmouseout".
Place this first bit of code in the <head> of your page:
Code:
<script language="javascript" type="text/javascript">
<!--
if (document.images)
{
navbutton1on= new Image(put-your-imagewidth-here,your-image-height);
navbutton1on.src="navbutton1-over.gif";
navbutton1off= new Image(your-image-width,your-image-height);
navbutton1off.src="navbutton1-off.gif";
}
function m_over(imgName)
{
if (document.images)
{
imgOn=eval(imgName + "on.src");
document[imgName].src= imgOn;
}
}
function m_out(imgName)
{
if (document.images)
{
imgOff=eval(imgName + "off.src");
document[imgName].src= imgOff;
}
}
//-->
</script>
and then place the following code in the body of the page (wherever you want your image rollover to be).
Code:
<a href="#" onmouseout="m_out('navbutton1')" onmouseover="m_over('navbutton1')">[img]navbutton1-off.gif[/img]
You can see a working sample
here.
Let me know how you get on! :o)
Paul