javascript function not doing anything
<p>I have the following function that I want to hide some of the text input fields in my  form. all the fields I want hidden are contained in the div 'site2'</p>

<pre><code>&lt;script language="Javascript"&gt;

function showHide(value) {
if (value=='yes') {
        document.getElementById(site2).style.display = "none";
        document.getElementById(site2).style.display = "block";
        document.add.addSite2Line1.disabled=true;
    }
    else if (value=='no') {
        document.getElementById(site2).style.display = "inline";
        document.getElementById(site2).style.display = "none";
    }
}
}
    &lt;/script&gt;
</code></pre>

<p>and a drop down box created. it should show when no is selected</p>

<pre><code>&lt;label&gt;&lt;span&gt;Single Site?&lt;/span&gt;&lt;Select name="field" onchange="showHide(this.selectedIndex);"&gt;&lt;/label&gt;
 &lt;Option value="yes"&gt;yes&lt;/option&gt;
 &lt;Option value="no"&gt;no&lt;/option&gt;
 &lt;/Select&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
</code></pre>

<p>However when I run the page nothing happens at all</p>
