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

