// ****** Font-Scale ****** Copyright by www.bundesregierung.de
function FontSize(_size, _targets, _exceptions) {
    this.size = _size || 13;
    this.min = 9;
    this.max = 24;
    this.targets = _targets || ['fsTextbody','fsHeadbold','fsHeadnormal'];
    this.exceptions = _exceptions || 'haferbrei#hirsebrei#';
    this.lucky = this.checkBrowser();
  }
FontSize.prototype = {
  larger : function() {
    (this.size < this.max) ? ++this.size : this.size;
    if (this.lucky) this.scale();
  },
  smaller : function() {
    (this.size > this.min) ? --this.size : this.size + 'px';
    if (this.lucky) this.scale();
  },
  scale : function() {
    var oTarget = null;
    for (var k = 0; k < this.targets.length; k++) {
      oTarget = document.getElementById(this.targets[k]);
      if (oTarget) this.changeSize(oTarget);
    }
  },
  changeSize : function(oo) {
    if (oo.style) {
      oo.style.fontSize = this.size + 'px';
      oo.style.lineHeight = '1.3em';
    }
    for (var k = 0; k < oo.childNodes.length; k++) if (this.exceptions.indexOf((oo.childNodes[k].id || '#') + '#') == -1) this.changeSize(oo.childNodes[k]);
  },
  checkBrowser : function() {
    if (document.all && document.getElementById) return true;
    if (navigator.userAgent.indexOf('Netscape6/') >= 0 || navigator.userAgent.indexOf('Gecko') >= 0) return true;
    return false;
  },
  inc : function(oo) {
    this.larger();
    if (oo) oo.blur();
    return false;
  },
  dec : function(oo) {
    this.smaller();
    if (oo) oo.blur();
    return false;
  }
}
font_size = new FontSize();

// ehemals in utility.js
function Utility() {
	this.ua();
	this.libPath = '';
}
