// JavaScript Document
function changeFontSize(strAction) {
	
  var curFontSize;
  var bodyFontSize = 11; //11px is the font size for the BODY tag. 
  var testSize;

  curFontSize = getStyle('divContent', 'font-size');
  if (typeof(curFontSize) == 'undefined') curFontSize = getStyle('divContent', 'fontSize');
  if (curFontSize == '') {
    newFontSize = 11; 
  } else { 
    if(curFontSize.substr(curFontSize.length - 2, curFontSize.length) == 'em') { 
      newFontSize = curFontSize.substr(0, curFontSize.length - 2) * bodyFontSize;
    } else {
      newFontSize = curFontSize.substr(0, curFontSize.length - 2);	    
    } 
  }
  if (!isNaN(newFontSize)) newFontSize = newFontSize / bodyFontSize; 
  if (strAction == 'Enlarge') {
    newFontSize = parseFloat(newFontSize) + 0.2 + 'em';
    setStyle('divContent', 'fontSize', newFontSize);
  } else {
    newFontSize = parseFloat(newFontSize) - 0.2 + 'em';
    setStyle('divContent', 'fontSize', newFontSize);
  }
  
  CreateCookies(newFontSize);
}


// JavaScript Document
function CreateCookies(strFontSize) {
  //Set cookie values.
  SetCookie('FontSize', strFontSize, 365);
}

function SetCookie(name, value, expiredays) {
  var exdate = new Date()
  exdate.setDate(exdate.getDate()+expiredays)
  document.cookie = name + "=" + escape(value) +
  ((expiredays==null) ? "" : ";expires=" + exdate.toGMTString());
}

function GetCookie(name) { 
  var cname = name + "=";
  var dc = document.cookie;
  if (dc.length > 0)
  { begin = dc.indexOf(cname);
    if (begin != -1)
    { begin += cname.length;
      end = dc.indexOf(";", begin);
      if (end == -1) end = dc.length;
      return unescape(dc.substring(begin, end));
    } 
  }
  return null;
}