javascript declare function with timeout
<p>I have javascript like and i want to set time delay to this function parameters.here is my simple function</p>

<pre><code>function mopen(id)
    {   

        mcancelclosetime();

        if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
        ddmenuitem = document.getElementById(id);
        ddmenuitem.style.visibility = 'visible';

    }
</code></pre>

<p>and here i want to set a timeout delay with id.I mean</p>

<p>the id should open with a time delay like this</p>

<pre><code>function settimeout(mopen(id),1000)
{
}
</code></pre>

<p>But My this try is not working please help me how can i do this</p>

<p><strong>Update</strong></p>

<p>here is my loop function</p>

<pre><code> function hideshow(span) {
        hideDiv();
        var div = document.getElementById("DIV_" + span.id);
        if (div.style.display == "none")
        setTimeout(div.style.display = "block",2000);
        else
            div.style.display = "none"; 
    }
</code></pre>

<p>can u please now tell me how to settimeout for the div to become a block.I have set it but its not working</p>
