
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(lid)
{
url = 'mailerstatus.php?lid=' + lid;
 if (xmlHttp) {
     xmlHttp.open('GET', url, true);
     xmlHttp.onreadystatechange = function () {
         if (xmlHttp.readyState == 4) {
             document.getElementById("progress_content").innerHTML = xmlHttp.responseText;
         }
     };
     xmlHttp.send(null);
 }
}

function uaData(workbase,page)
{
url = 'workbase.php?workbase=' + workbase + '&page1=' + page;
 if (xmlHttp) {
     xmlHttp.open('GET', url, true);
     xmlHttp.onreadystatechange = function () {
         if (xmlHttp.readyState == 4) {
             document.getElementById("progress_content").innerHTML = xmlHttp.responseText;
         }
     };
     xmlHttp.send(null);
 }
}

function startMail()
{
 if (xmlHttp) {
     xmlHttp.open('GET', 'iframe_mailer.php');
    // xmlHttp.onreadystatechange = function () {
       //  if (xmlHttp.readyState == 4) {
		 
		// 	if (xmlHttp.responseText == "weiter") {
		//	startMail();
             //document.getElementById("progress_content").innerHTML = xmlHttp.responseText;
		//	 }
       //  }
     //};
     //xmlHttp.send(null);
 }
}

function saveData()
{
if (xmlHttp) {
    xmlHttp.open('POST', 'setdata.php');
    xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xmlHttp.send('name='+document.frmshoutbox.txtname.value+'&message='+document.frmshoutbox.txtmessage.value);
}


}

function UploadStatus(id)
{
url = 'uploadstatus.php?status=true&id=' + id;
 if (xmlHttp) {
     xmlHttp.open('GET', url, true);
     xmlHttp.onreadystatechange = function () {
         if (xmlHttp.readyState == 4) {
             document.getElementById("progress_content").innerHTML = xmlHttp.responseText;
         }
     };
     xmlHttp.send(null);
 }
}
