// Function for creating the HTTPRequest-object
// By trial and error method based on browser.
function GetXmlHttpObject() {
    var req = null;

    if(window.XMLHttpRequest) {
        try {
            req = new XMLHttpRequest();
        } 
        catch(e) {
            req = null;
        }
    }
    else if(window.ActiveXObject)
    {
        try {
            req = new ActiveXObject("Msxml2.XMLHTTP"); 
        }
        catch(e) {
            try {
                req = new ActiveXObject("Microsoft.XMLHTTP"); 
            } 
            catch(e) {
                req = null;
            }
        }
    }
    return req;
}
