function Ajax(id,url,params) {
    //alert("id : "+id+"\n"+"url : "+url+"\n"+"params : "+params);
    this.id = id;
    this.params = "?clearCache="+new Date().getTime()+"&"+params;
    this.url = url;
    this.init = function () {

        try {
            // Firefox, Opera 8.0+, Safari
            return new XMLHttpRequest();

        }
        catch (e) {
            // Internet Explorer
            try {
                return new ActiveXObject("Msxml2.XMLHTTP");
            }
            catch (e) {
                try {
                    return new ActiveXObject("Microsoft.XMLHTTP");
                }
                catch (e) {
                    alert("Your browser does not support AJAX!");
                }
            }
        }
    };
}

Ajax.prototype.get = function (xmlHttp) {

with (this)
   xmlHttp.onreadystatechange = function(){
        if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {            
            document.getElementById(id).innerHTML = xmlHttp.responseText;
        } else {
            document.getElementById(id).innerHTML = '<div id="loading"><img src="images/lightbox-ico-loading.gif" style="vertical-align:middle"/></div>';
        }
    }

with (this)
    xmlHttp.open("GET", url+params, true);
    xmlHttp.send(null);

    
};

Ajax.prototype.post = function (xmlHttp) {

   with (this)
    xmlHttp.onreadystatechange = function(){
        if (xmlHttp.readyState == 4) {
            document.getElementById(id).innerHTML = xmlHttp.responseText;
        } else {
            document.getElementById(id).innerHTML = '<img src="images/lightbox-ico-loading.gif" style="vertical-align:middle"/';
        }
    }

    xmlHttp.open("POST", this.url, true);
    xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    xmlHttp.send(this.params);
};