var min=8;
var max=42;
function increaseFontSize() {
   var h1 = document.getElementsByTagName('h1');
   for(i=0;i<h1.length;i++) {
      if(h1[i].style.fontSize) {
         var s = parseInt(h1[i].style.fontSize.replace("px",""));
      } else {
         var s = 20;
      }
      if(s!=max) {
         s += 1;
      }
      h1[i].style.fontSize = s+"px"
   }
   var h2 = document.getElementsByTagName('h2');
   for(i=0;i<h2.length;i++) {
      if(h2[i].style.fontSize) {
         var s = parseInt(h2[i].style.fontSize.replace("px",""));
      } else {
         var s = 14;
      }
      if(s!=max) {
         s += 1;
      }
      h2[i].style.fontSize = s+"px"
   }
   var h3 = document.getElementsByTagName('h3');
   for(i=0;i<h3.length;i++) {
      if(h3[i].style.fontSize) {
         var s = parseInt(h3[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s += 1;
      }
      h3[i].style.fontSize = s+"px"
   }
   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 strong = document.getElementsByTagName('strong');
   for(i=0;i<strong.length;i++) {
      if(strong[i].style.fontSize) {
         var s = parseInt(strong[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s += 1;
      }
      strong[i].style.fontSize = s+"px"
   }

   var label = document.getElementsByTagName('label');
   for(i=0;i<label.length;i++) {
      if(label[i].style.fontSize) {
         var s = parseInt(label[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s += 1;
      }
      label[i].style.fontSize = s+"px"
   }

   var a = document.getElementsByTagName('a');
   for(i=0;i<a.length;i++) {
      if(a[i].style.fontSize) {
         var s = parseInt(a[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s += 1;
      }
      a[i].style.fontSize = s+"px"
   }
}




function decreaseFontSize() {

   var h1 = document.getElementsByTagName('h1');
   for(i=0;i<h1.length;i++) {
      if(h1[i].style.fontSize) {
         var s = parseInt(h1[i].style.fontSize.replace("px",""));
      } else {
         var s = 20;
      }
      if(s!=min) {
         s -= 1;
      }
      h1[i].style.fontSize = s+"px"
   }

   var h2 = document.getElementsByTagName('h2');
   for(i=0;i<h2.length;i++) {
      if(h2[i].style.fontSize) {
         var s = parseInt(h2[i].style.fontSize.replace("px",""));
      } else {
         var s = 14;
      }
      if(s!=min) {
         s -= 1;
      }
      h2[i].style.fontSize = s+"px"
   }

   var h3 = document.getElementsByTagName('h3');
   for(i=0;i<h3.length;i++) {
      if(h3[i].style.fontSize) {
         var s = parseInt(h3[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      h3[i].style.fontSize = s+"px"
   }

   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 label = document.getElementsByTagName('label');
   for(i=0;i<label.length;i++) {
      if(label[i].style.fontSize) {
         var s = parseInt(label[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      label[i].style.fontSize = s+"px"
   }

   var strong = document.getElementsByTagName('strong');
   for(i=0;i<strong.length;i++) {
      if(strong[i].style.fontSize) {
         var s = parseInt(strong[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      strong[i].style.fontSize = s+"px"
   }

   var a = document.getElementsByTagName('a');
   for(i=0;i<a.length;i++) {
      if(a[i].style.fontSize) {
         var s = parseInt(a[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      a[i].style.fontSize = s+"px"
   }
}

