var method = "post";
var encoding = "UTF-8";

var OntoRequest = Class.create({
     initialize: function(options){
        new Ajax.Request(options.url, {
            method: method,
            encoding: encoding,
            parameters: options.parameters,
            onFailure: function(trasport){
                alert("Unsuccessful request");
            },
            onSuccess: function(transport){ options.onSuccess(transport)}
        })
     }
});