StvFontSize = Class.create();StvFontSize.prototype = {    // Cookieから復帰  initialize: function(cookieName){      this.cookieName = cookieName;      this.fontsize = parseInt(FontSizeCmanager.getCookie(cookieName));      this.change(this.fontsize);  },    // フォントを変える  change: function(fontsize){      var per = 0.9; // bodyのFont-Sizeが90%なので。       var imgsize = "middle";      if (fontsize==1){          imgsize = "small";          per = 0.75;      } else if (fontsize==3){          imgsize = "big";          per = 1.2;      }            $A($('textSize').getElementsByTagName('img')).each(function(img){          if (img.src.match(/\/font_(\w+)(_on)?\.gif$/)){              if (RegExp.$1 == imgsize){                  img.src = StvFontSize.prototype.toOnGif(img.src);              } else {                  img.src = StvFontSize.prototype.delOnGif(img.src);              }          }      });      document.getElementById('main').style.fontSize = per*100 + '%';      FontSizeCmanager.setCookie(this.cookieName, String(fontsize));  },    // 画像を_on.gifにする  toOnGif: function(src){      if (src.match(/^(.+)\.gif$/)){          src = RegExp.$1+'_on.gif';      }      return src;  },    // 画像から_onをとる  delOnGif: function(src){      if (src.match(/^(.+)_on\.gif$/)){          src = RegExp.$1+'.gif';      }      return src;  }}Event.observe(window, "load", function(){    FontSizeCmanager = new CookieManager();    fontsize = new StvFontSize("fontsize");});
