var AJAX = {
sendRequest: function (uri, handler)
{
AJAX.handler = handler;
AJAX.http.open("GET", uri + '&nocache_please=' + Math.ceil(Math.random()*10000), true);
AJAX.http.onreadystatechange = AJAX.handleResponse;
AJAX.http.send(null);
},
handleResponse: function ()
{
if (AJAX.http.readyState == 4)
{
AJAX.response = AJAX.http.responseText;
AJAX.handler(AJAX.response);
}
},
getHTTPObject: function ()
{
var xmlhttp;
/
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {
xmlhttp = false;
}
}
return xmlhttp;
}
}
AJAX.http = AJAX.getHTTPObject();