function incFontSize()
{
  // alert(getStyle('font-size'));
  fsize = getStyle('fontSize') || getStyle('font-size');
  if(parseInt(fsize) <= 130 )
  {
      if(fsize.indexOf('%') != -1)
        newFsize = (parseInt(fsize) + 10) + '%';
      else
        newFsize = (parseInt(fsize) + 2) + 'px';

      document.body.style.fontSize = newFsize;
      saveFontSize(newFsize);
  }
}

function decFontSize()
{
  // alert(getStyle('font-size'));
  fsize = getStyle('fontSize') || getStyle('font-size');
  if(parseInt(fsize) >= 10 )
  {
      if(fsize.indexOf('%') != -1)
        newFsize = (parseInt(fsize) - 10) + '%';
      else
        newFsize = (parseInt(fsize) - 2) + 'px';

      document.body.style.fontSize = newFsize;
      saveFontSize(newFsize);
  }
}

function getStyle(styleProp)
{ 
   var x = document.body; 
   if (x.currentStyle) 
      var y = x.currentStyle[styleProp]; 
   else if (window.getComputedStyle) 
      var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp); 
   return y;
}

function saveFontSize(fontSize)
{
    document.cookie="fontsize=" + fontSize;
}

function loadFontSize()
{
  if (document.cookie.length > 0)
  {
    offset = document.cookie.indexOf("fontsize");

    // if cookie exists
    if (offset != -1) { 
      offset += 9;
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value    
      if (end == -1) end = document.cookie.length;
        document.body.style.fontSize = unescape(document.cookie.substring(offset, end))
      }
   }
}
