function AJAXfer (togglePath) {
	this.scriptFile = togglePath;

	// code for establishing an HTTP request connexion
	// this opbject recieves HTML returns for blind parsing to HTML doc
	this._factories = [
		function () { return new XMLHttpRequest(); },
		function () { return new ActiveXObject("Msxml2.XMLHTTP"); },
		function () { return new ActiveXObject("Microsoft.XMLHTTP"); }
	];

	this.newHTMLRequest = function (swtch) {
		if (this._factory!=null) return this._factory;
		for(var i=0;i<this._factories.length;i++) {
			try{
				var factory = this._factories[i];
				var request = factory();
				if (request!=null) {
					this._factory = factory;
					request.prep = function (URL) {
						this.open('POST',URL);
						this.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
						this.onreadystatechange = function () {
							if (request.readyState==4) {
								//alert('status= '+request.status);
								if (request.status==200) {
									request.execChange();
								}
							}
						}
					}
					request.responseTargets = new Array();
					request.home = swtch;
					return request;
				}
			}
			catch (e) {
				continue;
			}
		}
		this._factory = function () {
			throw new Error("XML requests not supported");
		}
		this._factory();
	}

	// make the re-useable server comm object 'request'
	this.reqObj = this.newHTMLRequest(this);

	// function to change tree
	this.reqObj.execChange = function (target) {
		//alert('rec= '+this.responseText);
		var arResponse = this.responseText.split('[+++]');
		//alert('received= '+arResponse.length);
		var g;
		if (this.responseTargets.length>0) {
			for (g=0;g<arResponse.length;g++) {
				alert(this.responseTargets[g]+'= '+arResponse[g]);
				this.responseTargets[g].innerHTML = arResponse[g];
			}
		}
		this.responseTargets = new Array();
	}

	this.addTarget = function (t) {
		this.reqObj.responseTargets.push(t);
	}

	this.sendRequest = function (s) {
		this.reqObj.prep(this.scriptFile);
		this.reqObj.send(s);
	}

	this.confirm = function () {
		alert('ajax path= '+this.scriptFile);
	}



}


