title: Trigger onClick event with URL
body: <p>I would like to be able to navigate to a page and open up content in one of three content containers in an accordion js structure.  </p>
  
  <p>Here is the html:</p>
  
  <pre><code>&lt;div id="navigation"&gt;
  &lt;div id="AccordionContainer" class="AccordionContainer"&gt;
              &lt;div onclick="runAccordion(1); ContentHeight=1040;" id="reel"&gt;
                  &lt;div class="AccordionTitle" onselectstart="return false;"&gt;REEL&lt;/div&gt;
              &lt;/div&gt;
              &lt;div id="Accordion1Content" class="AccordionContent"&gt;
                  &lt;div id="reelSpots"&gt;
                      content
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div onclick="runAccordion(2); ContentHeight=1075;"&gt;
                  &lt;div class="AccordionTitle" onselectstart="return false;"&gt;ABOUT&lt;/div&gt;
              &lt;/div&gt;
              &lt;div id="Accordion2Content" class="AccordionContent"&gt;
                  content
              &lt;/div&gt;
              &lt;div onclick="runAccordion(3); ContentHeight=175;"&gt;
                  &lt;div class="AccordionTitle" onselectstart="return false;"&gt;CONTACT&lt;/div&gt;
              &lt;/div&gt;
              &lt;div id="Accordion3Content" class="AccordionContent"&gt;
                  content
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>And here is my javascript:</p>
  
  <pre><code>// JavaScript Document
  
  var ContentHeight = 200;
  var TimeToSlide = 250.0;
  
  var openAccordion = '';
  
  function runAccordion(index)
  {
    var nID = "Accordion" + index + "Content";
    if(openAccordion == nID)
      nID = '';
  
    setTimeout("animate(" + new Date().getTime() + "," + TimeToSlide + ",'"
        + openAccordion + "','" + nID + "')", 33);
  
    openAccordion = nID;
  }
  
  function animate(lastTick, timeLeft, closingId, openingId)
  {  
    var curTick = new Date().getTime();
    var elapsedTicks = curTick - lastTick;
  
    var opening = (openingId == '') ? null : document.getElementById(openingId);
    var closing = (closingId == '') ? null : document.getElementById(closingId);
  
    if(timeLeft &lt;= elapsedTicks)
    {
      if(opening != null)
        opening.style.height = ContentHeight + 'px';
  
      if(closing != null)
      {
        closing.style.display = 'none';
        closing.style.height = '0px';
      }
      return;
    }
  
    timeLeft -= elapsedTicks;
    var newClosedHeight = Math.round((timeLeft/TimeToSlide) * ContentHeight);
  
    if(opening != null)
    {
      if(opening.style.display != 'block')
        opening.style.display = 'block';
      opening.style.height = (ContentHeight - newClosedHeight) + 'px';
    }
  
    if(closing != null)
      closing.style.height = newClosedHeight + 'px';
  
    setTimeout("animate(" + curTick + "," + timeLeft + ",'"
        + closingId + "','" + openingId + "')", 33);
  }
  </code></pre>
  
  <p>I'd love to be able to put a #reel in the URL string and be able to navigate to, and open Accordion1Content. </p>