JavaScript tabs - too many if functions that control it
<p>I have several tabs that my site changes between using Javascript. When ever a tab is clicked I need to know which one it was and which one I am currently on.</p>

<p>I have done this through the use of if functions(lots!). I now want to add a new tab and I have to expand all my if functions etc.</p>

<p>Is there a different implementation I can use for this, so future adding of tabs is easy and I don't have to use so many if functions.</p>

<p>I hope I made sense and there is a solution.</p>
