<!--

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];
  }
}


// Get the HTTP Object
function getHTTPObject() {
   if (window.ActiveXObject)
      return new ActiveXObject("Microsoft.XMLHTTP");
   else if (window.XMLHttpRequest)
      return new XMLHttpRequest();
   else {
      alert("Your browser does not support AJAX.");
      return null;
   }
}

function switchTab(tab) {
   httpObject = getHTTPObject();
   
   contentArea = new getObj('index_tab_content');
   contentArea.obj.innerHTML = '';

   switch(tab) {
      case 'process':
         processTab = new getObj('process_tab');
         processTab.obj.className = 'process_on';
         
         resourcesTab = new getObj('resources_tab');
         resourcesTab.obj.className = 'resources';
         
         newsTab = new getObj('news_tab');
         newsTab.obj.className = 'news';
         
         tabExtender = new getObj('index_tab_extender');
         tabExtender.obj.className = 'index_tab_extender_process';
         
         tabCell = new getObj('tab_cell');
         tabCell.style.background = 'url(media/layout/tab_cell_process_background.gif)';
         tabCell.style.backgroundPosition = 'bottom left';
         tabCell.style.backgroundRepeat = 'repeat-x';
         
         if (httpObject != null) {
			httpObject.open("GET", "tab_content_fetcher.php?tab=process", true);			
			httpObject.onreadystatechange = populateTabContent;
			httpObject.send(null);
		 }
		 
         break;
      
      case 'resources':
         processTab = new getObj('process_tab');
         processTab.obj.className = 'process';
         
         resourcesTab = new getObj('resources_tab');
         resourcesTab.obj.className = 'resources_on';

         newsTab = new getObj('news_tab');
         newsTab.obj.className = 'news';
         
         tabExtender = new getObj('index_tab_extender');
         tabExtender.obj.className = 'index_tab_extender_resources';
         
         tabCell = new getObj('tab_cell');
         tabCell.style.background = 'url(media/layout/tab_cell_resources_background.gif)';
         tabCell.style.backgroundPosition = 'bottom left';
         tabCell.style.backgroundRepeat = 'repeat-x';
         
         if (httpObject != null) {
			httpObject.open("GET", "tab_content_fetcher.php?tab=resources", true);			
			httpObject.onreadystatechange = populateTabContent;
			httpObject.send(null);
		 }
         break;
      case 'news':
         processTab = new getObj('process_tab');
         processTab.obj.className = 'process';
         
         resourcesTab = new getObj('resources_tab');
         resourcesTab.obj.className = 'resources';

         newsTab = new getObj('news_tab');
         newsTab.obj.className = 'news_on';
         
         tabExtender = new getObj('index_tab_extender');
         tabExtender.obj.className = 'index_tab_extender_news';
         
         tabCell = new getObj('tab_cell');
         tabCell.style.background = 'url(media/layout/tab_cell_news_background.gif)';
         tabCell.style.backgroundPosition = 'bottom left';
         tabCell.style.backgroundRepeat = 'repeat-x';
         
         if (httpObject != null) {
			httpObject.open("GET", "tab_content_fetcher.php?tab=news", true);			
			httpObject.onreadystatechange = populateTabContent;
			httpObject.send(null);
		 }
         break;
   }
}

function populateTabContent() {
   if(httpObject.readyState == 4) {
      var response = httpObject.responseText;
      contentArea = new getObj('index_tab_content');
      contentArea.obj.innerHTML = response;
   }
}

-->  