
/*
* Funktion erzeugt ein neues Ajax-Anfrage Objekt und
* gibt es zurück.
*/
function erzeugeAnfrage() {
  var anfrage = null;
  try {
    anfrage = new XMLHttpRequest();
  } catch (versuchmicrosoft) {
    try {
      anfrage = new ActiveXObject("Msxml2.XMLHTTP");
   } catch (anderesmicrosoft) {
      try {
        anfrage = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (fehlschlag) {
        anfrage = null;
      }
    }
  }

  if (anfrage == null){
    alert("Fehler beim Erzeugen des Anfrage-Objekts!");
  }
  else {
    return anfrage;
  }
}

