<HTML>
<HEAD>
<TITLE>onMouseOver</TITLE>
<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">
<SCRIPT LANGUAGE=\"JavaScript\">
<!--
var preloadFlag = false;
var activeMenu;
function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}
function preloadImages() {
if (document.images) {
home_over = newImage(\"gfx/home-over.gif\");
contact_over = newImage(\"gfx/contact-over.gif\");
preloadFlag = true;
}
}
function changeImages() {
if (document.images && (preloadFlag == true))
if (activeMenu != changeImages.arguments[0])
for (var i=0; i<changeImages.arguments.length; i+=2)
document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
}
function resetAll() {
changeImages(\'home\', \'gfx/home-off.gif\');
changeImages(\'contact\', \'gfx/contact-off.gif\');
}
function setActive(arg) {
activeMenu = arg;
resetAll();
}
// -->
</SCRIPT>
</HEAD>
<BODY BGCOLOR=\"#FFFFFF\" onLoad=\"preloadImages();\">
<A HREF=\"java script:setActive(\'home\');\" onFocus=\"this.blur();\" onMouseOver=\"changeImages(\'home\', \'gfx/home-over.gif\'); return true;\" onMouseOut=\"changeImages(\'home\', \'gfx/home-off.gif\'); return true;\" onClick=\"setActive(\'home\'); return true;\"><IMG NAME=\"home\" SRC=\"gfx/home-off.gif\" WIDTH=\"57\" HEIGHT=\"57\" BORDER=\"0\"></A>
<A HREF=\"java script:setActive(\'contact\');\" onFocus=\"this.blur();\" onMouseOver=\"changeImages(\'contact\', \'gfx/contact-over.gif\'); return true;\" onMouseOut=\"changeImages(\'contact\', \'gfx/contact-off.gif\'); return true;\" onClick=\"setActive(\'contact\'); return true;\"><IMG NAME=\"contact\" SRC=\"gfx/contact-off.gif\" WIDTH=\"57\" HEIGHT=\"57\" BORDER=\"0\"></A>
</BODY>
</HTML>
<A HREF=\"java script:setActive(\'contact\');\"
udskiftes med dit link (tjener til formål at vise koden fungerer... hvis du bruger # vil eksemplet reloade sig selv - det ønsker man ikke.
/ Lars
www.ljweb.com