Mouse over Image

This one... is nice for links. Before you click an image link, it changes to another image. Cool eh? This script doesn't work on MSIE or older versions of Netscape though... but ah well. Just hold the mouse over the image to your right that says, "Merc-chan!"
In the HEAD tag

<script language="JavaScript"><!--
// hide contents
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 3) version = "n3";
else version = "msie";
if (version == "n3")
{
menu1on = new Image; menu1on.src="merc-aqua.jpg";
menu1off = new Image(50,50); menu1off.src="merc-blue.jpg";
}
function img_act(imgName)
{
if (version == "n3")
{
imgOn = eval(imgName + "on.src");
document [imgName].src = imgOn;
}
}
function img_inact(imgName)
{
if (version == "n3")
{
imgOff = eval(imgName + "off.src");
document [imgName].src = imgOff;
}
}
// -->
</script>

In the IMAGE tag

<a href="mouse-image.html" onmouseover="img_act('menu1')" onmouseout="img_inact('menu1')">
<img src="merc-blue.jpg" border="0" name="menu1"></a>

Javascript :: We-bu-pee-ji