adding a timeout delay to javascript?
<p>can someone help me please i am trying to make this javascript start its function after a 3 second delay using time out.</p>

<p>I am still learning javascript and jquery and would be grateful if someone could show me where im going wrong and how to fix it.</p>

<p>Thank you.</p>

<pre><code>&lt;script type="text/javascript"&gt;
    setTimeout(function(){
window.onload = function showPopUp(el) {
var cvr = document.getElementById("cover")
var dlg = document.getElementById("dialog")
cvr.style.display = "block"
dlg.style.display = "block"
if (document.body.style.overflow = "hidden") {
    cvr.style.width = "1024"
    cvr.style.height = "100&amp;#37;"
    }
}
},3000);

&lt;/script&gt; 
</code></pre>
