//Allison Nighswander


//AJAX: sends request to server
function request(urlString)
{
  //alert(urlString);
  	var xmlHttp = getXMLHTTP();
  	xmlHttp.open("GET", urlString, false);
  	xmlHttp.send("");
	var response = xmlHttp.responseText;
  	response = response.replace("\n", "");
	response = response.replace("\r", "");
  	return response;
}

//AJAX: Gets the XMLHTTP object 
function getXMLHTTP()
{
  var xmlHttp;
  try
  {
    xmlHttp = new XMLHttpRequest(); //Firefox, Opera 8.0, Safari
  }
  catch (e)
  {
    try
    {
      xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");  //IE 6.0
    }
    catch (e)
    {
      try
      {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); //IE 5.5
      }
      catch (e)
      {
        alert("Your browser does not support AJAX.");
        return false;
      }
    }
  }
  return xmlHttp;
}
