function Resizer(){
  this.init_(arguments);
}

Resizer.prototype = {
  // 設定項目は以下４変数
  // 拡大・縮小一段階ごとのサイズ定義 font-size, line-heightに相当
  // listf(font-size)とlisth(line-height)の数を合わせること
  // 数があってればいくつでもOK
  listf: [ '90%', '100%', '110%', '120%', '130%', '140%', '150%', '200%' ],
  listh: [ '110%', '130%', '140%', '150%', '160%', '160%', '180%', '250%' ],
  // def,cur: 標準にするサイズが上の配列の何番目かを設定。0始まり
  def: 1,
  cur: 1,

  //いかは触らないで。
  targets: new Array(),
  large: function(){
    var newsize = this.cur+1;
    if(newsize >= this.listf.length) newsize = this.listf.length-1;
    this.cur = newsize;
    this.resize_();
  },
  small: function(){
    var newsize = this.cur-1;
    if(newsize<0) newsize = 0;
    this.cur = newsize;
    this.resize_();
  },
  normal: function(){
    this.cur = this.def;
    for(var i = 0; i < this.targets.length; ++i){
      var d = document.getElementById(this.targets[i]);
      d.style.fontSize = "";
      d.style.lineHeight = "";
    }
  },
  resize_: function(){
    for(var i = 0; i < this.targets.length; ++i){
      var d = document.getElementById(this.targets[i]);
      d.style.fontSize = this.listf[this.cur];
      d.style.lineHeight = this.listh[this.cur];
    }
  },
  init_: function(arg){
    for(var i = 0; i < arg.length; ++i){
      this.targets.push(arg[i]);
    }
  }
};


