function Dynamics(name, urlprefix)
{
    this.name = name;
    this.isIE = document.all?true:false;
    this.URLPrefix = urlprefix;
    this.init = function ()
        {
            this.engine = window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP");
        };
    this.setURLPrefix = function (prefix)
        {
            this.URLPrefix = prefix;
        };
    this.getName = function ()
        {
            return this.name;
        };
    this.getState = function ()
        {
            return this.engine.readyState;
        };
    this.getStatus = function ()
        {
            return this.engine.status;
        };
    this.getStatusText = function ()
        {
            return this.engine.statusText;
        };
    this.getXML = function ()
        {
            return this.engine.responseXML;
        };
    this.getText = function ()
        {
            return this.engine.responseText;
        };

    // asynchronous call
    this.send = function (url)
        {
            this.init();
            if (this.engine)
            {
                this.engine.open("POST", this.URLPrefix + url, true);
                if (this.isIE) this.engine.send();
                else this.engine.send(null);
            }
        };
	
    // synchronous call
    this.sendSync = function(url)
        {
            this.init();
            if (this.engine)
            {
                this.engine.open("POST", this.URLPrefix + url, false);
                if (this.isIE) this.engine.send();
                else this.engine.send(null);
            }
        };

    // asynchronous call
    this.sendLoad = function(url, processor)
        {
            this.init();
            if (this.engine)
            {
                this.engine.onreadystatechange = new Dynamics_hLoadFunction(this, processor);
                this.engine.open("POST", this.URLPrefix + url, true);
                if (this.isIE) this.engine.send();
                else this.engine.send(null);
            }
        };
	
     // asynchronous call
     this.sendLoad2 = function(url, processor)
        {
            this.init();
            if (this.engine)
            {
                this.engine.onreadystatechange = new Dynamics_hLoadFunction(this, processor);
                this.engine.open("GET", this.URLPrefix + url, true);
                if (this.isIE) this.engine.send();
                else this.engine.send(null);
            }
        };

    //
}
Dynamics_hLoadFunction = function(obj, processor)
{
    this.check = function ()
    {
        return processor(obj);
    };
    return this.check;
};