//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, Safari usw.
if (!xmlHttp  && typeof XMLHttpRequest != 'undefined') {
    xmlHttp = new XMLHttpRequest();
}


setInterval("checkMail()",60000);



function checkMail()
{

 if (xmlHttp) {
     xmlHttp.open('POST', 'http://www.qpeople.de/app/checkmail.php', true);
	 xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	 xmlHttp.send('uid='+document.loginBox.userid.value);
     xmlHttp.onreadystatechange = function () {
         if (xmlHttp.readyState == 4) {
             document.getElementById("newMess").innerHTML = xmlHttp.responseText;			 
         }
     };
    
 }
	

}


checkMail();
