Q:

JavaScript: toggle links active/deactive

How do I toggle HTML links from being active / deactive using JavaScript? 
Within my HTML, I have 2 hyper links that call a JavaScript function to sort a table:
<a href="javascript:sort('asc');">ASC</a> | <a href="javascript:sort('desc');">DESC</a>

What I would like to do is when someone clicks the "ASC" link, it then deactives the "ASC" hyperlink (no longer a link) so that only now the "DESC" link is active. 
Then, if the person presses the "DESC" link, it then disables the "DESC" link and re-enables the "ASC" link. 
Essentially, I want to toggle between which link is active, either: "ASC" or "DESC"
I assume you can do this with JavaScript but am not sure how? 
Any ideas? 

A:

Doesn't strictly "remove" the A tag, but removes the "linkness" (by removing the href) from the tag. 
Edit: slightly better version (now tested):
<script type="text/javascript" >

  function mySort( sortorder) {

      // enable the other link
      otherOrder = (sortorder == 'asc') ? ' desc' : 'asc';
      document.getElementById(otherOrder).setAttribute("href", "#");
      document.getElementById(otherOrder).onclick = function() {mySort(this.id)};

      //disable this link
      document.getElementById(sortorder).removeAttribute("href");
      document.getElementById(sortorder).onclick = "";

      //perform the sort
      doSort(sortorder);
  }
</script>

<a id="asc" href="#" onclick="mySort(this.id)" >ASC</a> | <a id="desc" href="#" onclick="mySort(this.id)" >DESC</a>

