
function ChangeTab(tabAnchor)
{
   var tabContainer = tabAnchor.parentNode.parentNode;
   
   
   for(var i=0; i<tabContainer.childNodes.length;i++) {
      var tab = tabContainer.childNodes[i];
      if(tab.className == "selected") {
         //Hide the tab that was last selected
         tab.className = "";
         //hide the contents of the tab that was last selected
         if(tab.childNodes[0].getAttribute("container") != null) {
            document.getElementById(tab.childNodes[0].getAttribute("container")).style.display = "none";
         }
      }
   }
   
   //select this tab
   tabAnchor.parentNode.className = "selected";
   
   if(tabAnchor.getAttribute("container") != null) {
      document.getElementById(tabAnchor.getAttribute("container")).style.display = "block";
   }
}
