Took a look at your code and couldn't really make much sense of the script your using to change your images. Where did you get that from ?!
Anywho, try using the following code:
**To be placed between your <head></head> tags**
Code:
script language="javascript">
<!-- hide script from old browsers
//detect browser, no need to change this:
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 3) browserVer = "1";
else if (browserName == "Microsoft Internet Explorer" && browserVer == 4) browserVer = "1";
else browserVer = "2";
//preload images:
if (browserVer == 1) {
//a1 is the first image
a1 = new Image();
//change the src to the location of your image
a1.src = "images/imageName.gif";
//a2 is the rollOver image
a2 = new Image();
//change the src to the location of your rollOver image
a2.src = "images/imageName2.gif";
}
//image swapping function, no need to change this:
function hiLite(imgDocID, imgObjName) {
if (browserVer == 1) {
document.images[imgDocID].src = eval(imgObjName + ".src");
}
}
//end hiding -->
</script>
**Place the following code within the <a href> tag of your link**
[]onMouseOver="hiLite('a','a2')" onMouseOut="hiLite('a','a1')"[/code]
For example:
Code:
<a href= http://wwww.yourdomain.com onMouseOver="hiLite('a','a2')" onMouseOut="hiLite('a','a1')">Your image link here</a>
Last edited by Enigmatic; 07-04-2005 at 04:18 AM..
|