var anfrage = null;
  try {    anfrage = new XMLHttpRequest();    }
  catch (e) {
    try {    anfrage = new ActiveXObject("Msxml2.XMLHTTP");    }
    catch (e) {
            try {   anfrage = new ActiveXObject("Microsoft.XMLHTTP");    }
      catch (e) {   anfrage = null;    }
    }
  }

function ajaxanfrage(wahl, LG, VN) {
  if(anfrage != null) {
    var url="sm_fo_city.php";
    var parameter = "?country=" + wahl + "&LG=" + LG + "&VN=" + VN;
    url += parameter;
    anfrage.open("GET", url, true);
    anfrage.onreadystatechange = showcity;
    anfrage.send(null);
  }
  else {
    alert("The XMLHttpRequest-Object could not be established.");
  }
}

function showcity() {
  if(anfrage.readyState== 4) {
    if (anfrage.status==200) {    var ccity = anfrage.responseText;    document.getElementById("city").innerHTML = ccity;    }
  }
}




function ajaxanfrage2(wahl2) {
  if(anfrage != null) {
    var url="sm_fo_office.php";
    var parameter = "?city="+wahl2;
    url += parameter;
    anfrage.open("GET", url, true);
    anfrage.onreadystatechange=showOffice;
    anfrage.send(null);
  }
  else {
    alert("The XMLHttpRequest-Object could not be established.");
  }
}

function showOffice() {
  if(anfrage.readyState== 4) {
    if (anfrage.status==200) {
      var office = anfrage.responseText;
      document.getElementById("office").innerHTML = office;
    }
  }
}
