var min=8;
var max=30;
function increaseFontSize() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s += 1;
      }
      p[i].style.fontSize = s+"px"
   }
   
   var h = document.getElementsByTagName('h1');
   for(i=0;i<h.length;i++) {
      if(h[i].style.fontSize) {
         var t = parseInt(h[i].style.fontSize.replace("px",""));
      } else {
         var t = 18;
      }
      if(t!=max) {
         t += 1;
      }
      h[i].style.fontSize = t+"px"
   }
	
   var a = document.getElementsByTagName('a');
   for(i=0;i<a.length;i++) {
      if(a[i].style.fontSize) {
         var u = parseInt(a[i].style.fontSize.replace("px",""));
      } else {
         var u = 18;
      }
      if(u!=20) {
         u += 1;
      }
      a[i].style.fontSize = u+"px"
   }
}
function decreaseFontSize() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
   }      
   
   var h = document.getElementsByTagName('h1');
   for(i=0;i<h.length;i++) {
      if(h[i].style.fontSize) {
         var t = parseInt(h[i].style.fontSize.replace("px",""));
      } else {
         var t = 18;
      }
      if(t!=min) {
         t -= 1;
      }
      h[i].style.fontSize = t+"px"
   }   
   	
   var a = document.getElementsByTagName('a');
   for(i=0;i<a.length;i++) {
      if(a[i].style.fontSize) {
         var u = parseInt(a[i].style.fontSize.replace("px",""));
      } else {
         var u = 18;
      }
      if(u!=min) {
         u -= 1;
      }
      a[i].style.fontSize = u+"px"
   }
}