var _MTXHR = function( url, options )
{

	this._options = {
		ignoreScripts : false,
		onError : null,
		onSuccess : null,
		update : url
	};
	
	this._url = '/_code/module_async/pub.dispatch.php';
	
	this._ax = null;
	
	for( var option in options )
	{
		this._options[option] = options[option];
	}
	
	try
	{
		if( window.ActiveXObject )
		{
			this._ax = new ActiveXObject( 'Microsoft.XMLHTTP' );
		} else {
			this._ax = new ActiveXObject( 'Msxml2.XMLHTTP' );
		}
	} catch( e ) {
		this._ax = new XMLHttpRequest();
	}
	
}

_MTXHR.prototype.get = function( params )
{
	var paramString = '';
	for( var param in params )
	{
		paramString += ( paramString.length ? '&' : '?' ) + param + '=' + escape( params[param] );
	}
	this._ax.open( 'GET', this._url + paramString, true );
	var $this = this;
	this._ax.onreadystatechange = function()
	{
		if( $this._ax.readyState == 4 )
		{
			$this._responseText = $this._ax.responseText;
			if( !$this._options.ignoreScripts )
			{
				var scripts = null;
				this._responseText = $this._responseText.replace( /<script[^>]*>([\s\S]*?)<\/script>/gi, function()
				{
					scripts += arguments[0];
				});
				eval( scripts );
				scripts = null;
			}
			if( $this._options.onSuccess )
			{
				if( ( typeof $this._options.onSuccess ).toLowerCase() == 'function' )
				{
					$this._options.onSuccess( $this._responseText );
				}
			}
			var di;
			if(
				$this._options.update &&
				( di = document.getElementById( $this._options.update ) )
			)
			{
				di.parentNode.innerHTML = $this._responseText;
			}
		}
	}
	this._ax.send( null );
}
