I copied this script from a web site for a mouse over effect, and I'm trying to adapt it to my web page, and so far it ain't happening.

I've tried to duplicate the exact script, except for my images and I still cannot get it to work right.....

Any help would be appreciated!

Here's the script......(head)

<SCRIPT LANGUAGE="JavaScript">

<!--

if (document.images)
{ var image1 = new Image()
image1.src = "Graphics/b-homepage-1.gif"
var image1on = new Image()
image1on.src = "Graphics/b-homepage-2.gif"

var image2 = new Image()
image2.src = "Graphics/b-contactus-1.gif"
var image2on = new Image()
image2on.src = "Graphics/b-contactus-2.gif"

}
function off(imgName)
{ if (document.images)
document[imgName].src = eval(imgName + '.src')
}

function on(imgName)
{ if (document.images)
document[imgName].src = eval(imgName + 'on.src')
}

// -->

</SCRIPT>


Here's the script......(body)

<A onmouseover="on('image2');" onmouseout="off('image2')" href="homepage.html">
<IMG height=25 alt="Homepage"src="Graphics/b-homepage-1.gif" width=96 border=0 name=image2 ></A><BR>

<A onmouseover="on('image2');" onmouseout="off('image2')" href="contactus.html">
<IMG height=25 alt="Contact Us" src="Graphics/b-contactus-1.gif " width=96 border=0 name=image2 ></A>