
	ajax_results = new Container();
	function ajax( file, func, parameters, response, echo )
	{
		var xmlHttp;

		try
		{
			xmlHttp = new XMLHttpRequest();
		}
		catch( e )
		{
			try
			{
				xmlHttp=new ActiveXObject( 'Msxml2.XMLHTTP' );
			}
			catch( e )
			{
				try
				{
					xmlHttp = new ActiveXObject( 'Microsoft.XMLHTTP' );
				}
				catch( e )
				{
					alert( 'Ajax Not Supported' );
					return false;
				}
			}
		}

		xmlHttp.onreadystatechange = function()
		{
			if( xmlHttp.readyState == 4 )
			{
				if ( response )
				{
					if (echo == 1) {
						eval( response + '(\'' + xmlHttp.responseText + '\')');
					} else {
						cont = new Container();
						cont.fromPhp( xmlHttp.responseText );
						eval( response + '( cont.getAll() )' );
					}
				}
			}
		};

		//parameters_string = new Container();
		if ( parameters.constructor === Array || parameters.constructor === Object )
		{
			var constructor_test = parameters.constructor.toString().match( /function\s*(\w+)/ );
			if ( constructor_test && ( constructor_test.length == 2 ) && ( constructor_test[ 1 ] == 'Container' ) )
			{
				parameters_string = parameters.toPhp();
			}
			else
			{
				cont = new Container();
				for ( name in parameters )
				{
					cont.set( name, parameters[ name ] );
				}
				parameters_string = cont.toPhp();
			}
		}
		else
		{
			cont = new Container();
			cont.set( 'value', parameters );
			parameters_string = cont.toPhp();
		}
		
		if (echo == null) {
			echo = 0;
		}

		xmlHttp.open( 'GET', 'ajax?file=' + escape( file ) + '&function=' + escape( func ) + '&parameters=' + escape( parameters_string ) + '&echo=' + echo, true );
		xmlHttp.send( null );
	}
