Display one div if nothing is selected
<p>I use this javascript to display different div classes upon selection. I need to display one div class if nothing is selected, for example when page is loaded, and that replace it with one of the divs according to the selection...</p>

<pre><code>&lt;script type="text/javascript"&gt;&lt;!--
    var lastDiv = "";
    function showDiv(divName) {
    // hide last div
    if (lastDiv) {
        document.getElementById(lastDiv).className = "hiddenDiv";
    }
    //if value of the box is not nothing and an object with that name exists, then change the class
    if (divName &amp;&amp; document.getElementById(divName)) {
        document.getElementById(divName).className = "visibleDiv";
        lastDiv = divName;
    }
}
//--&gt;
    &lt;/script&gt;
</code></pre>

<p>css:</p>

<pre><code>&lt;style type="text/css" media="screen"&gt;&lt;!--
    .hiddenDiv {
    display: none;
    }
    .visibleDiv {
    display: block;
    border: 1px grey solid;
    }

    --&gt;&lt;/style&gt;
</code></pre>

<p>HTML:</p>

<pre><code>&lt;form id="FormName" action="blah.php" method="get" name="FormName"&gt;
        &lt;select name="selectName" size="1" onChange="showDiv(this.value);"&gt;
            &lt;option value=""&gt;Choose One...&lt;/option&gt;
            &lt;option value="one"&gt;first&lt;/option&gt;
            &lt;option value="two"&gt;second&lt;/option&gt;
            &lt;option value="three"&gt;third&lt;/option&gt;
        &lt;/select&gt;
    &lt;/form&gt;
    &lt;p id="one" class="hiddenDiv"&gt;This is paragraph 1.&lt;/p&gt;
    &lt;p id="two" class="hiddenDiv"&gt;This is paragraph 2.&lt;/p&gt;
    &lt;p id="three" class="hiddenDiv"&gt;This is paragraph 3.&lt;/p&gt;
</code></pre>

<p>Can anyone please help?</p>
