function xmlDom(url){	
	if(window.ActiveXObject){
		var xDom = new ActiveXObject('Microsoft.XMLDOM');
		xDom.async=false;
		xDom.load(url);
		return(xDom);
	}else if (window.XMLHttpRequest){
		var xHttp = new XMLHttpRequest();  
		xHttp.open('get', url, false);
		xHttp.send(null);
		var xDom = xHttp.responseXML;
		return(xDom);
	}else{
		alert('Your browser does not support XMLHTTP.11');
		return false;
	}
}

function xmlHttp(){
	var that = this;
	var xHttp = null;
	if (window.ActiveXObject){
		try{
			xHttp = new ActiveXObject('Msxml2.XMLHTTP')
		}catch(e){
			xHttp = new ActiveXObject('Microsoft.XMLHTTP');
		}   
	}else if(window.XMLHttpRequest){
		xHttp = new XMLHttpRequest();
	}
	this.session = '';
	this.message = '';
	this.content = '';
	this.extend = new Object();
	this.onready = function(txt){};
	this.request = function(url, pars, method, async){
		if(!xHttp) return false;
		if(typeof(method)=='undefined') method = 'get';
		if(typeof(async)=='undefined') async = true;
		method = method.toLowerCase();
		if(method=='post'){
			xHttp.open(method, url, async);
			xHttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
			xHttp.setRequestHeader('Method', 'POST '+ url +' HTTP/1.1');
		}else{
			method = 'get';
			xHttp.open(method, url+'?'+pars, async);
			pars = null;
		};
		if(async){
			xHttp.onreadystatechange = function(){
				if(xHttp.readyState == 4) 
					that.onready(xHttp.responseText);
			}
		}
		xHttp.send(pars);
		if(async) return true;
		else return(xHttp.responseText); 
	}
	this.destroy = function(){
		this.onready = function(txt){};
		xHttp = null;
	}
}