
	function AJAX(){

		// Declare
		var self		= this;
		this.http		= getHTTPObject()
		this.http.onreadystatechange = function(){
			 if (self.http.readyState == 4 && self.http.status == 200){
				self.onresponse( self.http.responseText )
			 }
		}

		this.post		= function( url ){
			this.http.open("GET", url, true)
			this.http.send(null);
		}

		this.onresponse	= function( xml ){

		}

	}


  function handleHttpResponse(){
	if (http.readyState == 4) {
	  var strResponse = http.responseText;
	  //var strResponse = http.responseXML;
	  switch (http.status) {
		case 404: // Page-not-found error
		  alert('Error: Not Found. The requested function could not be found.');
		  break;
		case 500: // Display results in a full window for server-side errors
		  handleErrFullPage(strResponse);
		  break;
		default:
		  if(strResponse.toLowerCase().indexOf( "The Service You Requested Is Unavailable At This Time" ) > -1){
			handleErrFullPage(strResponse);
		  }
		  else{
			processXML(strResponse)
		  }
		  break;
	  }
	}
  }

  function handleErrFullPage(strIn) {
	var errorWin;
	// Create new window and display error
	try {
			//errorWin = window.open('', 'errorWin');
			//errorWin.document.body.innerHTML = strIn;
	}
	// If pop-up gets blocked, inform user
	catch(e) {
			//alert('An error occurred, but the error message cannot be displayed because of your browser\'s pop-up blocker.\n' +
			//		'Please allow pop-ups from this Web site.');
			//alert(strIn)
	}
  }

  function getHTTPObject() {
	var xmlhttp;
	try {
	  xmlhttp = new XMLHttpRequest();
	}
	catch (e) {
	  try {
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	  }
	  catch (e) {
		xmlhttp = false;
	  }
	}
	return xmlhttp;
  }

var http = getHTTPObject(); // We create the HTTP Object  