help with javascript syntax for settimeout function statement
<p>The syntax for the setTimeout function in javascript code below is correct</p>

<pre><code>setTimeout("document.getElementById('test').style.display='none'",3000);
</code></pre>

<p>I want to substitute the var testdiv to shorten the code</p>

<pre><code>testdiv = document.getElementById('test');
</code></pre>

<p>But when I substitute the var testdiv into the setTimeout call, it does not work with the syntax that I have.</p>

<pre><code>setTimeout("testdiv.style.display='none'",3000); //does not work with wrapping dblquotes.

setTimeout(testdiv.style.display='none',3000); //does not work either.
</code></pre>

<p>What is the correct syntax for writing this statement using the short cut?</p>

<p>TIA</p>
