// JavaScript Document

function requestObject(URL, METHOD)
{
	var request;
	this.url = URL;
	this.method = METHOD;
}

requestObject.prototype.createRequest = CREATE_REQUEST;
requestObject.prototype.sendRequest = SEND_REQUEST;

function CREATE_REQUEST()
{
	try {
    this.request = new XMLHttpRequest();
  } catch (trymicrosoft) {
    try {
      this.request = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (othermicrosoft) {
      try {
        this.request = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (failed) {
        this.request = false;
      }
    }
  }
   if (this.request.overrideMimeType) {
	this.request.overrideMimeType('text/xml');
 }

  if (!this.request)
    alert("Error initializing XMLHttpRequest!");	
}

function SEND_REQUEST(obj)
{
	this.request.open(this.method, this.url, true);
	this.request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
	if (obj)
	{
		this.request.send(obj);
	} else {
		this.request.send(null);
	}
}
