nell'head, tra i tag script, così:
codice:
<script type="text/Javascript">
function sopra(img) {
   this.src = img;
}
function fuori(img) {
   this.src = img;
}
</script>