

function FontSizer (minsize, maxsize, defsize) {
    this.minsize = minsize || 11;
    this.maxsize = maxsize || 20;
    this.defsize = defsize || 12;

    this.init = function () {
        if (document.getElementById && document.getElementsByTagName) {
            var sizer = document.getElementById('subicons');

            if (sizer) {
                sizer.style.display="block";
                this.cursize = getCookie("fontSize");
                this.cursize = !isNaN(parseFloat(this.cursize)) ? parseFloat(this.cursize) : this.defsize;
                if (this.cursize > this.maxsize)
                    this.cursize = this.maxsize;
                if (this.cursize < this.minsize)
                    this.cursize = this.minsize;

                var el = document.getElementById("cont_inp");
                if(!el) el = document.getElementById("tableleftcol");

                if (el) {
                    el.style.fontSize= this.cursize + "px";
                    this.el = el;
                }
            }
        }
    }

    this.adjust = function (n) {
        if (this.cursize && this.el) {
            this.cursize += n;
            if (this.cursize > this.maxsize)
                this.cursize = this.maxsize;
            if (this.cursize < this.minsize)
                this.cursize = this.minsize;
            this.el.style.fontSize= this.cursize + "px";
            setCookie("fontSize",this.cursize,180,"/");
        }
    }

}
