<td>
<script language="JavaScript" >
<!-- hide
var browserOK = false;
var pics;
// -->
</script>
<script language="JavaScript1.1">
<!-- hide
//JavaScript 1.1!
browserOK = true;
pics = new Array();
// -->
</script>
<script language="JavaScript" >
<!-- hide
var objCount = 0;
function preload(name, first, second) {
if (browserOK) {
pics[objCount] = new Array(3);
pics[objCount][0] = new Image();
pics[objCount][0].src = first;
pics[objCount][1] = new Image();
pics[objCount][1].src = second;
pics[objCount][2] = name;
objCount++;
}
}
function on(name){
if (browserOK) {
for (i = 0; i < objCount; i++) {
if (document.images[pics[i][2]] != null)
if (name != pics[i][2]) {
document.images[pics[i][2]].src = pics[i][0].src;
} else {
document.images[pics[i][2]].src = pics[i][1].src;
}
}
}
}
function off(){
if (browserOK) {
for (i = 0; i < objCount; i++) {
if (document.images[pics[i][2]] != null)
document.images[pics[i][2]].src = pics[i][0].src;
}
}
}
preload("link1", "img1", "img2");
preload("link2", "img1", "img2");
preload("link3", "img1", "img2");
preload("link4", "img1", "img2");
// -->
</script>
</head>
<body>
<a href="link1" onMouseOver="on('link1')" onMouseOut="off()"><img name="link1" src="img1" border="0"></a><a href="link2" onMouseOver="on('link2')" onMouseOut="off()"><img name="link2" src="img1" border="0"></a><a href="link3" onMouseOver="on('link3')" onMouseOut="off()"><img name="link3" src="img1" border="0"></a><a href="link4" onMouseOver="on('link4')" onMouseOut="off()"><img name="link4" src="img1" border="0"></a>
</body>
Вот пример