﻿var lastclsid = null;

function getXmlHttp(clsid) {
    var xmlHttp = null;
    try {
        xmlHttp = new ActiveXObject(clsid);
        lastclsid = clsid;
        return xmlHttp;
    } catch (ex) { }
}

//AJAX通信オブジェクト取得
function createHttpRequest() {
    var xmlHttp = null;
    var clsids = ["Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.5.0", "Msxml2.XMLHTTP.4.0", "Msxml2.XMLHTTP.3.0", "Msxml2.XMLHTTP.2.6", "Microsoft.XMLHTTP.1.0", "Microsoft.XMLHTTP.1", "Microsoft.XMLHTTP"];

    if (window.XMLHttpRequest) {
        //■win mac linux m1,f1,o8  ■mac s1  ■linux k3
        return new XMLHttpRequest();
    } else if (window.ActiveXObject) {
        for (var i = 0; i < clsids.length && xmlHttp == null; i++) {
            xmlHttp = getXmlHttp(clsids[i]);
        }
        return xmlHttp;
    } else {
        return null;
    }
}

