Moin Hannipuu,
die Grundlagen dafür sind http://de.selfhtml.org/javascript/@titlt=JavaScript. In Deinem speziellen Fall brauchst Du aber kein JavaScript sondern kannst mit einem Link, einem Bild und http://de.selfhtml.org/css/@titlt=CSS arbeiten:
<a href="#" class="link"> </a>
a:link .link {display:block;width:[x]px;height:[y]px;background:black}
a:visited .link{display:block;width:[x]px;height:[y]px;background:black}
a:hover .link {display:block;width:[x]px;height:[y]px;background:url(dein.bild) no-repeat}
a:active .link {display:block;width:[x]px;height:[y]px;background:url(dein.bild) no-repeat}
a:focus .link {display:block;width:[x]px;height:[y]px;background:url(dein.bild) no-repeat}
Gruß aus Berlin!
eddi