var fontSize;
var bd = new BrowserDetect();
if (bd.isWin()) {
  fontSize = "13px";
} else if (bd.isMac()) {
  if (bd.isSafari() || bd.isGecko()) {
    fontSize = "12px";
  }
  if (bd.isOpera() || bd.isIE()) {
    fontSize = "13px";
  }
}
document.writeln("<style type='text/css'><!--");
document.writeln("body { font-size:"+fontSize+"; }");
document.writeln("--></style>");

function BrowserDetect() {
  this.ua = navigator.userAgent;

  // OS
  this.isWin = function() {
    return (this.ua.indexOf("Win") >= 0);
  };
  this.isMac = function() {
    return (this.ua.indexOf("Mac") >= 0);
  };

  // Browser
  this.isIE = function() {
    return (this.ua.indexOf("MSIE") >= 0 && !this.isOpera());
  };
  this.isGecko = function() {
    return (this.ua.indexOf("Gecko/") >= 0);
  };
  this.isSafari = function() {
    return (this.ua.indexOf("Safari") >= 0);
  };
  this.isOpera = function() {
    return (this.ua.indexOf("Opera") >= 0);
  };
}

