/*
var xmlHttp;

function getTwitter(person, div) {
	var url = "http://livingchurch.com/ajax.php?person=" + person;
	getAjax(url, person, div);
}

function getAjax(url, person, div) {
	xmlhttp=new XMLHttpRequest();
	xmlhttp.onreadystatechange = function() { 
		if (xmlhttp.readyState==4) {
			document.getElementById(div).innerHTML = xmlhttp.responseText;
		}
	}
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
}
*/

function getXMLHttp() {
  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 getTwitter(person) {
	var url = "http://livingchurch.com/twitter.php?person=" + person;
	var xmlHttp = getXMLHttp();
  xmlHttp.onreadystatechange = function() {
    if(xmlHttp.readyState == 4) {
      showTwitter(person, xmlHttp.responseText);
    }
  }
  xmlHttp.open("GET", url, true);
  xmlHttp.send(null);
}

function showTwitter(person, response) {
  document.getElementById(person).innerHTML = response;
}