function AjaxReqClass () {
	function _createRequest () {
		try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {}
		try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}
		try { return new XMLHttpRequest(); } catch(e) {}
		window.alert("XMLHttpRequest not supported");
		return null;
	}
	var _request = _createRequest();
	this.getReadyState = function () {return _request.readyState;} //0 = uninitialized,1 = loading,2 = loaded,3 = interactive,4 = complete
	this.getResponseXML = function () {return _request.responseXML;}
	this.getResponseText = function () {return _request.responseText;}
	this.getStatus = function () {return _request.status;}
	this.abort = function () {_request.abort();}
	// ---
	this.requestXML = function (url,method,data,handle) {//method,data can be empty
		if (typeof(method) == 'undefined') {
			method = 'POST';
		}
		var async = true;
		if (typeof(handle) == 'undefined') {
			async = false;
		}
		else{
			handle._request = _request;
		}
		if (_request) {
			_request.open(method, url, async);
			if (async) {
				_request.onreadystatechange = handle;
			}
			_request.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=utf-8');
			_request.send(data);
			return _request.responseXML;
		}
	}
	// ---
	this.requestText = function (url,method,data,handle) {//method,data can be empty
		if (typeof(method) == 'undefined') {
			method = 'POST';
		}
		var async = true;
		if (typeof(handle) == 'undefined') {
			async = false;
		}
		else{
			handle._request = _request;
		}
		if (_request) {
			_request.open(method, url, async);
			if (async) {
				_request.onreadystatechange = handle;
			}
			_request.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
			_request.send(data);
			return _request.responseText;
		}
	}
}

function openw(urlarg, winname){
	var w = window.open(urlarg, winname);
	w.focus();
}