function miniprofileHandleHttpResponse() {
    if (miniprofileHttp.readyState == 4) {
        results = miniprofileHttp.responseText;
        document.getElementById('miniprofil').innerHTML = results;
    }
}
function getMiniprofile(username) {
    document.getElementById('miniprofil').innerHTML = "<div align=\"center\"><img src=\"images/loading_circle.gif\"><br />Lade Profil<br /><br /><span style=\"font-size: 9px;\">Vorgang sollte nach<br />wenigen Sekunden abge-<br />schlossen sein.<br />[<a href=\"javascript:void(0);\" onClick=\"document.getElementById('minip').style.display = 'none';\">abbrechen</a>]</span></div>";
    document.getElementById('minip').style.display = "block";
    miniprofileHttp.open("GET", "miniprofile.php?username=" + escape(username), true);
    miniprofileHttp.onreadystatechange = miniprofileHandleHttpResponse; 
    miniprofileHttp.send(null);
}

function miniEventHandler(e) {
    mpbreite = 220;
    if (!e)
        e = window.event;
    if(document.all) {
        x = window.event.clientX + document.body.scrollLeft;
        x = (x > (document.body.clientWidth - mpbreite)) ? document.body.clientWidth - mpbreite : x;
        y = window.event.clientY + document.body.scrollTop;
        document.all.minip.style.left = x;
        document.all.minip.style.top = y;
    }
    else {
        x = e.pageX;
        x = (x > (window.innerWidth - mpbreite)) ? window.innerWidth - mpbreite : x;
        y = e.pageY;
        document.getElementById("minip").style.left  = x + "px";
        document.getElementById("minip").style.top = y + "px";
    }
}
