// Copyright (C) 2005  Chris Halstead
//
// chris.halstead [at] gmail.com
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// The full text of the GPL is available at http://www.gnu.org/copyleft/gpl.html
//

function getHTTPObject() {
    var xmlHttpObj;
    /*@cc_on
    @if (@_jscript_version >= 5)
        try {
            xmlHttpObj = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
        try {
            xmlHttpObj = new ActiveXObject("Microsoft.XMLHTTP");
        } catch (E) {
            xmlHttpObj = false;
        }
    }
    @else xmlHttpObj = false;
    @end @*/
    if (!xmlHttpObj && typeof XMLHttpRequest != 'undefined') {
        try {
            xmlHttpObj = new XMLHttpRequest();
        } catch (e) {
            xmlHttpObj = false;
        }
    }
    return xmlHttpObj;
}
