// Quelle: http://www.devblog.de
// "Shoutbox als AJAX-Anwendung"
// Code darf frei verwendet werden

// 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();
}

function loadData(aufruf,ziel,id)
{
 if (xmlHttp) {
     xmlHttp.open('GET', aufruf+'.php?id='+id, true);
     xmlHttp.onreadystatechange = function () {
         if (xmlHttp.readyState == 4) {
             document.getElementById(ziel).innerHTML = xmlHttp.responseText;
         }
     };
     xmlHttp.send(null);
 }
}

function init2()
{
	document.getElementById('box2').innerHTML = '';
}
function init3()
{
	document.getElementById('box3').innerHTML = '';
}
function init4()
{
	document.getElementById('box4').innerHTML = '';
}
function aktionhide()
{
	document.getElementById('aktionsebene').style.display = 'none';
	document.getElementById('boxebene').style.display = 'block';
}

