function getObj(name) {
  if (document.getElementById) {
		this.obj = document.getElementById(name);
		this.style = document.getElementById(name).style;
  } else if (document.all) {
		this.obj = document.all[name];
		this.style = document.all[name].style;
  } else if (document.layers) {
		this.obj = document.layers[name];
		this.style = document.layers[name];
  }
}

function switchTab(tabID) {
   tab1Head = new getObj('tab-1-heading');
   tab1 = new getObj('tab-1');
   
   tab2Head = new getObj('tab-2-heading');
   tab2 = new getObj('tab-2');
   
   if(tabID == 'tab-1') {
      //switch to tab 1
      tab1Head.obj.className = 'on';
      tab1.obj.style.display = 'block';
      
      tab2Head.obj.className = '';
      tab2.obj.style.display = 'none';
   } else {
      //switch to tab 2
      tab2Head.obj.className = 'on';
      tab2.obj.style.display = 'block';
      
      tab1Head.obj.className = '';
      tab1.obj.style.display = 'none';
   }          
}         