function initAjax(sendString,sendURL) {
	var xmlHttp;
	try {
		xmlHttp=new XMLHttpRequest();
	}
	catch (e) {
		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
			try {
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) {
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function() {
		if(xmlHttp.readyState==4) {
			if (xmlHttp.responseText == "error") {
				listener.error(xmlHttp.responseText);
			} else {
				listener.succeed(xmlHttp.responseText);
			}
		}
	}
	xmlHttp.open("POST",sendURL,true);
	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
	xmlHttp.send(sendString);
	listener.loading();
}

function ajaxObj(sendString,sendURL) {
	this.loading = function() { alert("loading"); };
	this.error = function(msg) { alert(msg); };
	this.succeed = function(msg) { alert(msg); };
	this.Data = sendString;
	this.Url = sendURL;
	
	this.init = function() {
		this.loading();
		var xmlHttp;
		try {
			xmlHttp=new XMLHttpRequest();
		}
		catch (e) {
			try {
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e) {
				try {
					xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch (e) {
					alert("Your browser does not support AJAX!");
					return false;
				}
			}
		}
		xmlHttp.onreadystatechange=function() {
			if(xmlHttp.readyState==4) {
				if (xmlHttp.responseText == "error") {
					pnt.error(xmlHttp.responseText);
				} else {
					pnt.succeed(xmlHttp.responseText);
				}
			}
		}
		var pnt = this;
		var date = new Date();
		xmlHttp.open("POST",this.Url+"?"+date.getUTCMilliseconds(),true);
		xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8;");
		xmlHttp.send(this.Data);	
	}
}