// JavaScript Document


function Async(){
	Async.prototype.uri = '';
	Async.prototype.proc;
	
	if( typeof Async._initialized == 'undefined'){
		Async.prototype.setURI = function( _uri ){
			this.uri = _uri;	
		};
		Async.prototype.setProcessor = function( _proc ){
			this.proc = _proc;
		};
		
		Async.prototype.loadResponse = function(){
		   var xmlHttp = XmlHttp.create();
		   var async = true;
		   var sUri = this.uri;
		   xmlHttp.open("GET", sUri, async);
			var scopeProc = this.proc;
		   xmlHttp.onreadystatechange = function () {
			  if (xmlHttp.readyState == 4){
				  //alert(xmlHttp.responseText);
				  scopeProc.show(xmlHttp.responseText);
			  }
		   }
		   xmlHttp.send(null);
		};
	Async._initialized = true;
	}
}



