var links=-600;
var aktivlinks;
function ausg(datei,id,zahl)
{
  var xmlHttp = null;
// Mozilla, Opera, Safari sowie Internet Explorer (ab v7)
if (typeof XMLHttpRequest != 'undefined') {
    xmlHttp = new XMLHttpRequest();
}
if (!xmlHttp) {
    // Internet Explorer 6 und älter
    try {
        xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");
    } catch(e) {
        try {
            xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");
        } catch(e) {
            xmlHttp  = null;
        }
    }
}
if (xmlHttp) {
    xmlHttp.open('GET', "includes/"+datei, true);
    xmlHttp.onreadystatechange = function () {
    		if(id==1)
    		{
    			if (xmlHttp.readyState == 4) {
            var a=xmlHttp.responseText;
            auswertung(a,zahl);
        		}
    		}
        
   };
   xmlHttp.send(null);
}
}
function rein(datei,zahl){
if(aktivlinks)
	{window.clearInterval(aktivlinks);}
var testDokumentVorhanden;
if(document.getElementById("con"+zahl)){
	testDokumentVorhanden=document.getElementById("con"+zahl).style.left;
}
if(testDokumentVorhanden!="100px")
	ausg(datei,1,zahl);
}
function auswertung(text,zahl){
if(document.getElementById("import").firstChild)
	{document.getElementById("import").removeChild(document.getElementById("import").firstChild);}
document.getElementById("import").innerHTML += text;
aktivlinks=window.setInterval("aufschiebenLinks("+zahl+")",10);
}
function aufschiebenLinks(zahl){
links+=10;
document.getElementById("con"+zahl).style.left=links+"px";
if(links>=100){
window.clearInterval(aktivlinks);
links=-600;
}
}
