var xmlHttp = null;


// ++++++++++++++++++++++++++++++++++++++ Glossar FUNKTION 
function glossar (wert){
   if(window.ActiveXObject){
     try {
         xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");

     } catch(e) {
        try {
            xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");

        } catch(e){

        }
     }
   } else if (window.XMLHttpRequest){
     try {
         xmlHttp = new XMLHttpRequest;

     }   catch (e){

     }
   }

   if(xmlHttp){
     xmlHttp.open ('GET', 'php/ajax.php?q=' + escape(wert), true);
     xmlHttp.onreadystatechange = daten;
     xmlHttp.send(null);

   }




}  //Funktion glossar Ende


function daten(){
     if(xmlHttp.readyState == 4){
        document.getElementById('ausgabe').innerHTML =  xmlHttp.responseText;

     }

}






// ++++++++++++++++++++++++++++++++++++++ UPDATE FUNKTION



function get(name, id){
   if(window.ActiveXObject){
     try {
         xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");

     } catch(e) {
        try {
            xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");

        } catch(e){

        }
     }
   } else if (window.XMLHttpRequest){
     try {
         xmlHttp = new XMLHttpRequest;

     }   catch (e){

     }
   }

   if(xmlHttp){
     xmlHttp.open ('GET', 'ajax/update.php?q=' + escape(name) + '&id=' + escape(id), true);
     xmlHttp.onreadystatechange = daten2;
     xmlHttp.send(null);

   }

}

function daten2(){
    if(xmlHttp.readyState == 4){

    var brokenstring=xmlHttp.responseText.split("'");
    if (brokenstring[0] == 1) document.title = brokenstring[1];
    document.getElementById("b"+brokenstring[0]).style.display = "inline";



     }

}






