Does anyone know why this code does not work for firefox?

Code:
<SCRIPT language=JavaScript>

<!--
nereidFadeObjects = new Object();
nereidFadeTimers = new Object();

function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
if (object != "[object]"){
setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
return;
}

clearTimeout(nereidFadeTimers[object.sourceIndex]);

diff = destOp-object.filters.alpha.opacity;
direction = 1;
if (object.filters.alpha.opacity > destOp){
direction = -1;
}
delta=Math.min(direction*diff,delta);
object.filters.alpha.opacity+=direction*delta;

if (object.filters.alpha.opacity != destOp){
nereidFadeObjects[object.sourceIndex]=object;
nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
}
}

//-->

</SCRIPT>

Code:
<img src=imageurl.gif border=0 style=filter:alpha(opacity=20) onMouseOver=nereidFade(this,100,20,10) onMouseOut=nereidFade(this,20,5,5)>
It's suppose to make images fade when your most is over it. What you would do is you can stick the first code anywhere on the page, and the 2nd would be your around your image. I've tested this and as stated it works in explorer but not firefox.

Does anyone know why? and a why to make it work in firefox? or another code that can do the same thing?

Help greatly appreciated.