Find the element before and after a specific element with pure javascript
<p>Having a list with links like this:</p>

<pre><code>&lt;ul&gt;
    &lt;li&gt;&lt;a href="#"&gt;First tab&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#"&gt;Second tab&lt;/a&gt;&lt;/li&gt;
    &lt;li class="active"&gt;&lt;a href="#"&gt;Active tab&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#"&gt;Fourth tab&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#"&gt;Fifth tab&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>How can be found element before and after the active tab? (In this case, the second and fourth tab).</p>

<hr>

<p>I am looking for solution in <strong>pure JavaScript</strong> only, as jQuery solution is <a href="http://stackoverflow.com/questions/929670/find-the-element-before-and-after-a-specific-element">here</a>.</p>

<p><strong>Note:</strong> <code>nextElementSibling</code> and <code>previousElementSibling</code> are not supported by IE8 and FF3, so please post solutions that would be supported by those browsers as well. Thank you.</p>
