title: Recursion function not defined error
body: <p>Hi i have a problem with recursion.</p>
  
  <p>i followed this example from wc3 <a href="http://www.w3schools.com/jsref/met_win_settimeout.asp" rel="nofollow">http://www.w3schools.com/jsref/met_win_settimeout.asp</a>
  But mine seems to not work at all.</p>
  
  <pre><code>function rotateImages(start)
    {
    var a = new Array("image1.jpg","image2.jpg","image3.jpg", "image4.jpg");
    var c = new Array("url1", "url2", "url3", "url4");
    var b = document.getElementById('rotating1');
    var d = document.getElementById('imageurl');
    if(start&gt;=a.length)
        start=0;
    b.src = a[start];
    d.href = c[start];
    window.setTimeout("rotateImages(" + (start+1) + ")",3000);
    }
  
    rotateImages(0);
  </code></pre>
  
  <p>Firebug throws the error :</p>
  
  <pre><code>rotateImages is not defined
  [Break On This Error] window.setTimeout('rotateImages('+(start+1)+')',3000);
  </code></pre>
  
  <p>However if i change the timeOut to :</p>
  
  <pre><code>window.setTimeout(rotateImages(start+1),3000);
  </code></pre>
  
  <p>It recursives but somehow the delay doesn't work and gives me too much recursion(7000 in a sec)</p>