title: document.getElementById(id) and toggling multiple ids
body: <p>I have this simple function which toggles a hidden element in the webpage.</p>
  
  <pre><code>function showtable(id) 
   {
   if(document.getElementById(id).style.display == 'block')
    {
  document.getElementById(id).style.display = 'none';
    }else{
  document.getElementById(id).style.display = 'block';
  }
   } 
  
  
  &lt;input type="button" value="Toggle" onclick="showtable('id');" /&gt;
  </code></pre>
  
  <p>This works fine, but I want to toggle off some other (table) element (with certain ids) (except for the one which is being toggled, whether on or off) on the page every time the button is clicked.</p>