function ajaxFunction()
{
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
 	return xmlHttp;
}
function rs()
{
    if(xmlHttp.readyState==4)
    {
		this.func.call(this,xmlHttp.responseText);
		//this.func.call(this,xmlHttp.responseText);
		//this.data = xmlHttp.responseText;
    }
}

function returnNews()
{
    if(xmlHttp.readyState==4)
    {
		this.data = xmlHttp.responseText;
    }
}

function returnMembers()
{
    if(xmlHttp.readyState==4)
    {
		this.func.call(this,xmlHttp.responseText);
    }
}

function getMembers(func)
{
	xmlHttp.onreadystatechange = returnMembers;
	xmlHttp.open("POST","staff.php",true);
	
	var params = "data=true";
	
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.setRequestHeader("Content-length", params.length);
	xmlHttp.setRequestHeader("Connection", "close");
	xmlHttp.func = func;
  	xmlHttp.send(params);
}

function getNews(func,php)
{
	xmlHttp.onreadystatechange = rs;
	xmlHttp.open("POST",php,true);
	
	var params = "data=true";
	
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.setRequestHeader("Content-length", params.length);
	xmlHttp.setRequestHeader("Connection", "close");
	xmlHttp.func = func;
  	xmlHttp.send(params);
}


var xmlHttp = ajaxFunction();
