Ajax = {};
Ajax.makeRequest = function(method, url, params, callbackMethod)
{
this.request = (window.XMLHttpRequest)? new XMLHttpRequest(): new ActiveXObject
("MSXML2.XMLHTTP");
if(method=="POST"){
this.request.onreadystatechange = callbackMethod;
this.request.open(method, url, true);
this.request.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
this.request.setRequestHeader("Content-length", params.length);
this.request.send(params);
}else if(method == "GET"){
this.request.onreadystatechange = callbackMethod;
this.request.open(method, url + "?" + params, true);
this.request.send(null);
}else{
alert("Illegal method. pass GET or POST");
}
}
Ajax.checkReadyState = function(_id)
{
switch(this.request.readyState)
{
// 1 = loading
case 1:
document.getElementById(_id).innerHTML = "