
var ajaxObjList = new Array();

function ajaxObject() {
  this.xmlhttp=null;
  ajaxObjList[0] = this; 
}  	

  ajaxObject.prototype.postData = function(url,params,ongetdata)
  {
	this.xmlhttp=null
	this.ondata = ongetdata
// code for Mozilla, etc.
if (window.XMLHttpRequest)
  {  
  this.xmlhttp=new XMLHttpRequest()
  }
// code for IE
else if (window.ActiveXObject)
  {
  this.xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
  }
if (this.xmlhttp!=null)
  {
  //this.xmlhttp.onreadystatechange=this.state_Change
  
  this.xmlhttp.onreadystatechange=function()
  {    
if (ajaxObjList[0].xmlhttp.readyState==4)
  {
 
  if (ajaxObjList[0].xmlhttp.status==200)
    {
	ajaxObjList[0].ondata(ajaxObjList[0].xmlhttp.responseText)
    }
  else
    {
      ajaxObjList[0].ondata(null);
	  //alert("Problem retrieving XML data")
    }
  }

    
  }
  this.xmlhttp.open("POST",url,true)

  this.xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  this.xmlhttp.setRequestHeader("Content-length", params.length);

//  this.xmlhttp.setRequestHeader('Content-type', 'text/plain;charset=UTF-8')
  this.xmlhttp.send(params)
  } else {
  alert("Your browser does not support XMLHTTP.")
  }
}


