After changing those it is still not opening the tabs, maybe another typo? I will look as well before I go to work.
COuld it be this
Code:
var el = document.getElementById(element.id);
and this
Code:
onclick="swap (this);
needing to be something liek this
Code:
onclick="swap (this.terms);