Javascript fadein fadeout not working
<p>I have been trying to figure this out for a few days now and cant seem to get it right, I had it fading in but not out, and now that I have it setup to fadein and out it doesnt work at all.  What am I missing</p>

<p>javascript:</p>

<pre><code>function fadein(objectID, amount) {
    object = document.getElementById(objectID);

    animatefadein = function() {
        var MIN_OPACITY = 0;
        var MAX_OPACITY = 1;
        if (object.style.opacity &lt; MAX_OPACITY &amp;&amp; object.style.opacity &gt; MIN_OPACITY) {
            var current = Number(object.style.opacity);
            var newopac = current + amount;
            object.style.opacity = String(newopac);
            setTimeout('animatefadein()', 25);
        }
    }
    animatefadein();
}
</code></pre>

<p>and the html</p>

<pre><code>&lt;div id="rolloverwrapper" style="opacity:0;"&gt;&lt;/div&gt;
&lt;div id="wrapper"&gt;
    &lt;div id="content"&gt;
        &lt;div id="button"&gt;
            &lt;img src="images/dj.png" onmouseover="fadein('rolloverwrapper', 0.1);" onmouseout="fadein('rolloverwrapper', -0.1);"/&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>
