title: How do you toggle the visibility of a div in FF with javascript? (IE and Chrome work fine)
body: <p>So, I'm trying to toggle the visibility of a div layer using javascript and this is what it looks like:</p>
  
  <pre><code>document.all["layer1"].style.visibility='visible';
  </code></pre>
  
  <p>and</p>
  
  <pre><code>document.all["layer1"].style.visibility='hidden';
  </code></pre>
  
  <p>What would the syntax look like for this if I'm trying to do it in Firefox? If I know that, then I'll add in an if statement to check if the browser is firefox and use the alternate code.</p>