var dlAjax = Class.create ();

dlAjax.prototype.generate = function () {

    if (arguments.length != 2) {
        throw "dlAjax: Nothing to do";
    }

    var method = "operation=" + arguments [1];

    for (key in arguments [0]) {
        var value = arguments [0] [key];

        var tag = "&" + key + "=" + value;

        method= method + tag
    }

    this.request =  method;
}

dlAjax.prototype.send = function (callback) {

    var url = "/comments_ratings/XMLWebService.php";

    var ajaxRequest = new Ajax.Request (url + "?" + "ts=" + new Date ().getTime () + "&" + this.request, {
        method: 'get',
        onSuccess: callback
    });
}
