
function ajax() {

	this.conn = null;
	this.name = arguments[ 0 ];
	this.url;

	try {
		this.conn = new ActiveXObject( "Microsoft.XMLHTTP" );
	} catch( e ) {
		try {
			this.conn = new ActiveXObject( "Msxml2.XMLHTTP" );
		} catch( ex ) {
			try {
				this.conn = new XMLHttpRequest();
			} catch( exc ) {
				alert( "Esse browser não tem recursos para uso do Ajax" );
			}
		}
	}

	this.snd = function() {
		if ( this.conn.readyState == 0 || this.conn.readyState == 4 ) {
			var father = this;
			father.url
			sparam = '';
			for ( i = 0; i < arguments.length; i++ ) {
				if ( sparam != '' ) sparam += "&";
				sparam += "p" + i + "=" + arguments[ i ];
			}
			this.conn.open( "get", father.url + "?" + sparam, true );
			this.conn.onreadystatechange = function() {
				if( father.conn.readyState == 4 ) {
					if( father.conn.status == 200 ) {
						eval( father.conn.responseText );
					} else {
						alert( 'Erro :' + father.conn.responseText );
					}
				}
			};
			this.conn.send( null );
		}
	};

}


