// Enlarge/Shrink font-sizes script  ** version 1.2 **
var fontSizes = new Array ( 68.75, 75, 87.5, 100, 118.75, 143.75, 168.75 ); // Percent values intended only for IE/Win browsers
var currentFontSize = 1;

function enlargeFont() { resizeFont(1); return; }
function shrinkFont() { resizeFont(-1); return; }

function resizeFont(delta)
{
  var newSize = currentFontSize + delta;
  if ((newSize < 0) || (newSize >= fontSizes.length)) { newSize = currentFontSize; }
  setFontCookie(newSize);
  document.location.href = document.location.href;
  return;
}


function setFontSize()
{
  currentFontSize = getFontCookie();
  var pixelSize = (fontSizes[currentFontSize]/100) * 16;
  if ( (pixelSize - parseInt(pixelSize)) >= .5 ) { pixelSize++ }
  document.body.style.fontSize = (is_ie && !is_mac) ? fontSizes[currentFontSize] + "%" : pixelSize + "px";
}


// Copyright (c) 1996-1997 Athenia Associates. http://www.webreference.com/js/
// License is granted if and only if this entire copyright notice is included. By Tomer Shiran.
// Severly modified by Már Örlygsson (mar@anomy.net)  ** version 1.0 **
function setCookie (name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}
function setFontCookie(theSize)
{
  var now = new Date();
  var base = new Date(0);
  var skew = base.getTime();
  if (skew > 0) { now.setTime(now.getTime() - skew); }
  now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
  setCookie('fontSize', theSize, now, '/', document.location.host, '');
}
function getFontCookie (fontSize) {
  var prefix = 'fontSize=';
  var c = document.cookie;
  var cookieStartIndex = c.indexOf(prefix);
  if (cookieStartIndex == -1) { return currentFontSize; }
  var cookieEndIndex = c.indexOf(";", cookieStartIndex + prefix.length);
  if (cookieEndIndex == -1) { cookieEndIndex = c.length; }
  var cookieFontSize = parseInt( unescape( c.substring(cookieStartIndex + prefix.length, cookieEndIndex) ) );
  cookieFontSize = (cookieFontSize > 10) ? currentFontSize : (cookieFontSize > fontSizes.length) ? fontSizes.length : cookieFontSize;
  return cookieFontSize;
}
// end copyrighted part


// Depends on utils_1.0.js