﻿    
    ajax = {
        _createTransport: function() {
            if (typeof XMLHttpRequest != "undefined") {
                return new XMLHttpRequest();
            }
            else if (typeof ActiveXObject != "undefined") {
                var http = null;
                try {
                    http = new ActiveXObject("MSXML2.XmlHttp.6.0");
                    return http;
                }
                catch (ex) {
                    try {
                        http = new ActiveXObject("MSXML2.XmlHttp.3.0");
                        return http;
                    }
                    catch (ex2) {
                        throw Error("Cannot create XHR object");
                    }
                }
            }
        },

        post: function(object) {
            var _ajport = this._createTransport();
            _ajport.open('GET', object.url, true);
            _ajport.onreadystatechange = function() {
                if (_ajport.readyState == 4) {
                    if (_ajport.status == 200) {
                        object.success(_ajport);
                    }
                    else {
                        alert(_ajport.status);
                    }
                }
            }
            _ajport.send(null);
        }
    };