Make first link active Javascript
<p>I have this javascript code, and I want to make active the first link (tab) so when somebody is visiting the website can see it active. Also when the next tab/link is clicked, the first one (active tab/link) has to convert itself into a normal tab/link (unactive), and so do on!</p>

<p>Here is the Javascript:</p>

<pre><code>&lt;script type="text/javascript"&gt;
    function forumhome_tabs_switch(switch_id){
        document.getElementById('forumhome_tabs_switch_content').innerHTML =
        document.getElementById(switch_id).innerHTML;
    }
&lt;/script&gt;
</code></pre>

<p>And here is the HTML code:</p>

<pre><code>&lt;td style="cursor:pointer;" onclick="javascript: forumhome_tabs_switch('forumhome_tabs_$forum[forumid]'); return false;"&gt;
    &lt;a href="#" tabindex="2" onclick="javascript: forumhome_tabs_switch('forumhome_tabs_$forum[forumid]'); return false;"&gt;$forum[title]&lt;/a&gt;  
&lt;/td&gt;
</code></pre>

<p>It's not something like:</p>

<pre><code>&lt;li&gt;&lt;a href="#"&gt;1&lt;/li&gt; 
&lt;li&gt;&lt;a href="#"&gt;2&lt;/li&gt; 
&lt;li&gt;&lt;a href="#"&gt;3&lt;/li&gt;
...
</code></pre>

<p>Also cannot be done like that. Thats why I need help. The above code converts 3 links into 3 tabs, so each tab opens a section of the page. I just want to show first tab as active till the second tab is clicked.</p>

<p>P.D. Also I would like to pass the "onclick" from the "a" (links) to javascript code. Is that possible?</p>
