Momentan sieht es so aus:
onmouseover="buttonswechseln(rechtsbutton,rechtslight)" onmouseout="buttonswechseln(rechtsbutton,rechtsdark)"rechtslight = new Image();
rechtslight.src = "pics/button_nachrechts_light.jpg";rechtsdark = new Image();
rechtsdark.src = "pics/button_nachrechts_dark.jpg";function buttonswechseln(buttonid,zustand) {
document.getElementById(buttonid).src = zustand.src;
}
Eigentlich willst du:
onmouseover="buttonswechseln('rechtsbutton',rechtslight)" onmouseout="buttonswechseln('rechtsbutton',rechtsdark)"
function buttonswechseln(buttonid, zustand) {
document.getElementById(buttonid).src = zustand.src;
}
Struppi.