title: setTimeout issue in Firefox
body: <p>The menu system is supposed to expand and collapse according to a given delay using the following statements (<code>o_item.getprop('hide_delay')</code> returns 200 and <code>o_item.getprop('expd_delay')</code> returns 0):</p>
  
  <pre><code>this.o_showtimer = setTimeout('A_MENUS['+ this.n_id +'].expand(' + n_id + ');',
    o_item.getprop('expd_delay'));
  </code></pre>
  
  <p>and</p>
  
  <pre><code>this.o_hidetimer = setTimeout('A_MENUS['+ this.n_id +'].collapse();',
    o_item.getprop('hide_delay'));
  </code></pre>
  
  <p>I tried placing the code for the first argument into separate functions and call these functions as the first argument to setTimeout like this:</p>
  
  <pre><code>this.o_showtimer = setTimeout( expandItem(this.n_id, n_id),
        o_item.getprop('expd_delay'));
  </code></pre>
  
  <p>Firebug produced the following error message:</p>
  
  <pre><code>useless setTimeout call (missing quotes around argument?)
  </code></pre>
  
  <p>And there was no delay in the collapse.</p>
  
  <p>I placed the argument in quotes (though recommended against <a href="https://stackoverflow.com/questions/1598634/settimeout-usage-issues/1598643#1598643">here</a>) like this:</p>
  
  <pre><code>this.o_showtimer = setTimeout( "expandItem(this.n_id, n_id)",
    o_item.getprop('expd_delay'));
  </code></pre>
  
  <p>but this didn't work.  It appeared that nothing was happening at all and throwing some console.log() messages into the code confirmed this.</p>
  
  <p>I tried using an anonymous function call as recommended <a href="https://stackoverflow.com/questions/1598634/settimeout-usage-issues">here</a> and <a href="https://stackoverflow.com/questions/4267239/settimeout-doesnt-seem-to-be-working-in-firefox">here</a> like this:</p>
  
  <pre><code>this.o_showtimer = setTimeout( function() { expandItem(this.n_id, n_id); },
    o_item.getprop('expd_delay'));
  </code></pre>
  
  <p>but this didn't work either.  It produced undesirable results in IE (items not collapsing is the same manner as before) and nothing happening in Firefox (placing console.log() statements in expandItem and collapseItem functions confirmed that they weren't being called).</p>
  
  <p>I even tried doing the following:</p>
  
  <pre><code>this.o_hidetimer = setTimeout( function() { alert('test'); },
    o_item.getprop('hide_delay'));
  </code></pre>
  
  <p>and that didn't even work!  Seems there's something up with calling the anonymous function.</p>
  
  <p>Discovered that assigning the value of setTimeout to a variable <em>other</em> than this.o_showtimer made the left argument of setTimeout fire.  Must be something to do with assigning something to this.</p>
  
  <p>If I do this:</p>
  
  <pre><code>var o_showtimer = setTimeout( function() { expandItem(this.n_id, n_id); },
    o_item.getprop('expd_delay'));
  </code></pre>
  
  <p>expandItem gets called.  However, if I do this:</p>
  
  <pre><code>var o_showtimer = setTimeout( function() { expandItem(this.n_id, n_id); },
    o_item.getprop('expd_delay'));
  
   this.o_showtimer = o_showtimer;
  </code></pre>
  
  <p>As if setTimeout can predict the future! (expd_delay is 0!).</p>