OptionSaver = function(params) {
    if (!params.form) return;
    if (this.latest == undefined) this.latest = 0;
    this.params = params;
    this.name = this.params.name;        
    new Form.Observer(params.form, 0.2, this.onChange.bind(this));
}

OptionSaver.prototype.onChange = function() {    
    notify(this, 'before_save');
    request(this.params.url, this.params.form.serialize(true), this.after.bind(this), true, 'optsav');
}

OptionSaver.prototype.after = function(response) {
    this.response = response;
    notify(this, 'after_save');
}

