﻿//******************************************************************************
//* This code is to change the size of the fonts.  This is part of making a page
//* section 508 compliant.
//******************************************************************************
//* Joseph Guido
//* Compuware Corporation - copy wright 2007
//******************************************************************************

var min=1;
var max=1.3;

function increaseFontSize() 
{
   var p = document.getElementsByTagName('body');

   for(i = 0; i < p.length; i++) 
   {
      if(p[i].style.fontSize) 
      {} 
      else 
      {
         var s = 1;
      }

      if(p[i].style.fontSize) 
      {
         var s = parseFloat(p[i].style.fontSize.replace("em",""));
      } 
      
      if(s < max) 
      {
         s += .1;
      }
      
      p[i].style.fontSize = s+"em"
   }
}

function decreaseFontSize() 
{
   var p = document.getElementsByTagName('body');

   for(i = 0; i < p.length; i++) 
   {
      if(p[i].style.fontSize) 
      {} 
      else 
      {
         var s = 1;
      }

      if(p[i].style.fontSize) 
      {
         var s = parseFloat(p[i].style.fontSize.replace("em",""));
      } 
      
      if(s > min) 
      {
         s -= .1;
      }
      
      p[i].style.fontSize = s+"em"
   }   
}
