
function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}



//ajax to show the content

function showcontent(section)
{
  xmlhttp=GetXmlHttpObject();
  if (xmlhttp==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  }
 var url="getcontent.php";
 url=url+"?section="+section;
 url=url+"&sid="+Math.random();
 xmlhttp.onreadystatechange=stateChanged;
 xmlhttp.open("GET",url,true);
 xmlhttp.send(null);
}

function stateChanged()
{
  if(xmlhttp.readyState==4)
  {
   document.getElementById("tabcontent").innerHTML=xmlhttp.responseText;
  }
}

