title: Multiple ID in getElementById
body: <p>I've found a great tutorial to detach a navigation from the page to keep it static when you scroll using Javascript (<a href="http://code.stephenmorley.org/javascript/detachable-navigation/" rel="nofollow">http://code.stephenmorley.org/javascript/detachable-navigation/</a>). </p>
  
  <p>However, I'd like to implement this on more than one nav div.</p>
  
  <p>I assume it's adding another class name to  <code>document.getElementById('navigation').className</code> but I can't get the right syntax</p>
  
  <p>Here is the code:</p>
  
  <pre><code>/* Handles the page being scrolled by ensuring the navigation is always in
   * view.*/   
  function handleScroll(){
  
    // check that this is a relatively modern browser
  if (window.XMLHttpRequest){
  
  // determine the distance scrolled down the page
  var offset = window.pageYOffset
             ? window.pageYOffset
             : document.documentElement.scrollTop;
  
  // set the appropriate class on the navigation
  document.getElementById('navigation').className =
      (offset &gt; 104 ? 'fixed' : '');
  
    }
  
  }
  
  // add the scroll event listener
  if (window.addEventListener){
    window.addEventListener('scroll', handleScroll, false);
  }else{
    window.attachEvent('onscroll', handleScroll);
  }
  </code></pre>