var Pager = Class.create({
  initialize: function(pagername) {
    this.curpage = 1;
    this.pagername = pagername;
  },
  page: function() {
    $(this.pagername + 'indicator').className = 'ajaxindicator loading';
    new Ajax.Updater(this.pagername, '_content/' + this.pagername + '.php?m=' + this.curpage, {
        method: 'get',
        onComplete: function() {
          $(this.pagername + 'indicator').className = 'ajaxindicator ready';
        },
        evalScripts: true
      });
  },
  next: function() {
    if (this.curpage < this.numpages) this.curpage++;
    this.page();
    return false;
  },
  prev: function() {
    if (this.curpage > 1) this.curpage--;
    this.page();
    return false;
  }
});
