// JavaScript Document
var minp=12;
var maxp=24;
var minh=16;
var maxh=24;
var minth=14;
var maxth=24;
var mintd=14;
var maxtd=24;
function increaseFontSize() {
   var p = document.getElementsByTagName('p');
   var h3 = document.getElementsByTagName('h3');
   var td = document.getElementsByTagName('td');
   var th = document.getElementsByTagName('th');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 14;
      }
      if(s!=maxp) {
         s += 1;
      }
      p[i].style.fontSize = s+"px"
   }
   for(i=0;i<h3.length;i++) {
      if(h3[i].style.fontSize) {
         var s = parseInt(h3[i].style.fontSize.replace("px",""));
      } else {
         var s = 24;
      }
      if(s!=maxh) {
         s += 1;
      }
      h3[i].style.fontSize = s+"px"
   }
   for(i=0;i<td.length;i++) {
      if(td[i].style.fontSize) {
         var s = parseInt(td[i].style.fontSize.replace("px",""));
      } else {
         var s = 14;
      }
      if(s!=maxtd) {
         s += 1;
      }
      td[i].style.fontSize = s+"px"
   }
   for(i=0;i<th.length;i++) {
      if(th[i].style.fontSize) {
         var s = parseInt(th[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=maxth) {
         s += 1;
      }
      th[i].style.fontSize = s+"px"
   }
}
function decreaseFontSize() {
   var p = document.getElementsByTagName('p');
   var h3 = document.getElementsByTagName('h3');
   var td = document.getElementsByTagName('td');
   var th = document.getElementsByTagName('th');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 14;
      }
      if(s!=minp) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
   }  
   for(i=0;i<h3.length;i++) {
      if(h3[i].style.fontSize) {
         var s = parseInt(h3[i].style.fontSize.replace("px",""));
      } else {
         var s = 14;
      }
      if(s!=minh) {
         s -= 1;
      }
      h3[i].style.fontSize = s+"px"
   } 
   for(i=0;i<td.length;i++) {
      if(td[i].style.fontSize) {
         var s = parseInt(td[i].style.fontSize.replace("px",""));
      } else {
         var s = 14;
      }
      if(s!=mintd) {
         s -= 1;
      }
      td[i].style.fontSize = s+"px"
   }
   for(i=0;i<th.length;i++) {
      if(th[i].style.fontSize) {
         var s = parseInt(th[i].style.fontSize.replace("px",""));
      } else {
         var s = 14;
      }
      if(s!=minth) {
         s -= 1;
      }
      th[i].style.fontSize = s+"px"
   }
}