Unable to make recursive call in Javascript
<p>When I try to run this program, I get an error in Firefox saying that:</p>

<blockquote>
  <p>moveDate is undefined on line 41 </p>
</blockquote>

<p>(referring to the line <code>window.setTimeout("moveDate()",100);</code>. </p>

<p>Any ideas why? I thought recursive functions were able to define themselves and then call upon themselves.</p>

<pre><code>function monthScroller(){
    document.getElementById("month").style.visibility = "visible";
    var x = 0;
    var y = 0;
    var dest_x = window.innerWidth/2;
    var dest_y = window.innerHeight/2;  
    var interval = 1;

    function moveDate() {
        if(x&lt;dest_x){ x = x + interval;} 
        if(y&lt;dest_y){ y = y + interval;}

        document.getElementById("month").style.top  = y+"px";
        document.getElementById("month").style.left = x+"px";

        if ((x+interval &lt; dest_x) &amp;&amp; (y+interval &lt; dest_y)) {
                window.setTimeout("moveDate()",100);
        }
        else{
            name();
        }
    }
    moveDate();
}
</code></pre>
