
function ajUtils(){

 
	
	this.xmlhttpSend = xmlhttpSend;
	function xmlhttpSend(strURL, getPost) {
		if (typeof getPost == 'undefined' ) var getPost = 'POST';
			var xmlHttpReq = false;
			var self = this;
		
			// Mozilla/Safari
			if (window.XMLHttpRequest) {
				self.xmlHttpReq = new XMLHttpRequest();
			}	
			// IE
			else if (window.ActiveXObject) {
				self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
			}	
	
			self.xmlHttpReq.open(getPost, strURL, false);
			self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
			self.xmlHttpReq.onreadystatechange = function() {
	    }
		self.xmlHttpReq.send(strURL);
	}


	this.xmlhttpSendAndRecieve = xmlhttpSendAndRecieve;
	function xmlhttpSendAndRecieve(strURL, responseFunction, getPost, postVars) {
		if (typeof getPost == 'undefined' ) var getPost = 'POST';
		if (typeof postVars == 'undefined' ) var postVars = '';
		var xmlHttpReq = false;	
	    var self = this;
	    // Mozilla/Safari
	    if (window.XMLHttpRequest) {
			self.xmlHttpReq = new XMLHttpRequest();
	    }
	    // IE
	    else if (window.ActiveXObject) {
			self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
	    }
	
	    self.xmlHttpReq.open(getPost, strURL, true);
	    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	
	   self.xmlHttpReq.onreadystatechange = function() {
			if (self.xmlHttpReq.readyState == 4) {
				document.body.style.cursor='default';
				responseFunction(self.xmlHttpReq.responseText);
			} else {
				document.body.style.cursor='wait';
			}
	    }
		if (getPost == "GET" || getPost == "get" || getPost == "Get"){
			self.xmlHttpReq.send(strURL);
		}else if (getPost == "POST" || getPost == "post" || getPost == "Post"){
			self.xmlHttpReq.send(postVars); // eg: postVars = 'arg1=val1&arg2=val2&arg3=val3';
		}
	}
	
}
