

function resizeFontSize( amount, limit, step )
{
	if( step == undefined )
		step = 10;
	if( limit == undefined )
		limit = 0
  if ( !document.body.style.fontSize )
    document.body.style.fontSize = "100.1%";
  
  var fSize = document.body.style.fontSize;

  fSize = fSize.replace(/%/, "");

  if ( amount == 1)
    fSize = parseInt(fSize) + step;
  else if( amount == -1)
    fSize = parseInt(fSize) - step;
  else
    fSize = 100.1;
  
  if( limit ) {
	  if( fSize > 100.1 + (step * limit))
		  fSize = 100.1 + (step * limit);
	  if( fSize < 100.1 - (step * limit))
		  fSize = 100.1 - (step * limit);
  }
  
  fSize = fSize + "%";
  
  document.cookie = "font_size=" + fSize + ";path=/";
  
  document.body.style.fontSize = fSize;
}

