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 MakeRequest(pos)
{
  var xmlHttp = getXMLHttp();
  
  xmlHttp.onreadystatechange = function()
  {
    if(xmlHttp.readyState == 4)
    {
      HandleResponse(xmlHttp.responseText);
    }
  }
  
  if (pos==1) { filo = "pullSubjectsSearch.php?level=1"; }
  if (pos==2) { filo = "pullSubjectsSearch.php?level=2"; }
  if (pos==3) { filo = "pullSubjectsSearch.php?level=3"; }
  if (pos==4) { filo = "pullSubjectsSearch.php?level=4"; }  
  if (pos==5) { filo = "pullSubjectsSearch.php?level=5"; }
  if (pos==6) { filo = "pullSubjectsSearch.php?level=6"; }
  if (pos==7) { filo = "pullSubjectsSearch.php?level=7"; }
 
  
  xmlHttp.open("GET", filo, true); 
  xmlHttp.send(null);
}

function HandleResponse(response)
{
  document.getElementById('ResponseDiv').innerHTML = response;
}
