// ******************************************************
//  Copyright 2006 by
//
//          arquakon.de - Matthias Marquardt
//
//  Version 0.4
// ******************************************************

var MMxmlHttp = false;

try {
    MMxmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
    try {
        MMxmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    } catch(e) {
        MMxmlHttp = false;
    }
}
if (!MMxmlHttp && typeof XMLHttpRequest != 'undefined') {
    MMxmlHttp = new XMLHttpRequest();
}


function AJAXGet(Seite) {
    var SiteTitel  = "";
    var SiteInhalt = "";
    var wce = "ja";
    
    if (MMxmlHttp) {
        MMxmlHttp.open('GET', Seite, true);
        MMxmlHttp.onreadystatechange = function () {
            if (MMxmlHttp.readyState == 4) {
                if (MMxmlHttp.status == 200) {
                    var dce = MMxmlHttp.responseXML.getElementsByTagName("Com").item(0);
                    if (MMxmlHttp.responseXml) {
                        wce = dce.firstChild.nodeValue;
                        SiteTitel = da.firstChild.nodeValue;
                        SiteInhalt = db.firstChild.nodeValue;
                    } else if (MMxmlHttp.responseText) {
                        wce = dce.textContent;
                        SiteTitel = da.textContent;
                        SiteInhalt = db.textContent;
                    }
                    alert('Funktion aufrufen...');
                } else {
                    alert('Es ist ein Problem aufgetreten.');
                }
            }
        };
        MMxmlHttp.send(null);
    }
}
