//globale Instanz von XMLHttpRequest
var xmlHttp = false;

// XMLHttpRequest-Instanz erstellen
// ... für Internet Explorer
try {
    xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
    try {
        xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");
    } catch(e) {
        xmlHttp  = false;
    }
}
// ... für Mozilla, Opera und Safari
if (!xmlHttp  && typeof XMLHttpRequest != 'undefined') {
    xmlHttp = new XMLHttpRequest();
}

var xmlHttpObject = false;

var id_zuordnung;

if (typeof XMLHttpRequest != 'undefined') 
{
    xmlHttpObject = new XMLHttpRequest();
}
if (!xmlHttpObject) 
{
    try 
    {
        xmlHttpObject = new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch(e) 
    {
        try 
        {
            xmlHttpObject = new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch(e) 
        {
            xmlHttpObject = null;
        }
    }
}


function loadContent(id_temp, datei)
{
	id_zuordnung = id_temp;
	xmlHttpObject.open('get', datei, false);
	xmlHttpObject.onreadystatechange = handleContent;							// für synchronen Modus (true) nötig
	xmlHttpObject.send(null);
	document.getElementById(id_zuordnung).innerHTML = xmlHttpObject.responseText;
}

function handleContent()
{
    if (xmlHttpObject.readyState == 4)
    {
        document.getElementById(id_zuordnung).innerHTML = xmlHttpObject.responseText;
    }
}

function loadContent2(id_temp1, datei1, id_temp2, datei2)
{
	loadContent(id_temp1, datei1);
	loadContent(id_temp2, datei2);
}

function ladeUhr()
{
 if (xmlHttp) {
     xmlHttp.open('GET', 'funktionen/uhrzeit.php', true);
     xmlHttp.onreadystatechange = function () {
         if (xmlHttp.readyState == 4) {
             document.getElementById("uhrzeit").innerHTML = xmlHttp.responseText;
         }
     };
     xmlHttp.send(null);
 }
}


function infotext(id, inhalt)
{
	document.getElementById(id).innerHTML = inhalt;
}


