var min=14;
var max=30;
function increaseFontSize() {
   var p = document.getElementsByTagName('p');
   var li = document.getElementsByTagName('li');
   var h4 = document.getElementsByTagName('h4');
   var h5 = document.getElementsByTagName('h5');
   var h6 = document.getElementsByTagName('h6');
   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!=max) {
         s += 1;
      }
      p[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 = 14;
      }
      if(s!=max) {
         s += 1;
      }
      li[i].style.fontSize = s+"px"
   }
   for(i=0;i<h4.length;i++) {
      if(h4[i].style.fontSize) {
         var s = parseInt(h4[i].style.fontSize.replace("px",""));
      } else {
         var s = 14;
      }
      if(s!=max) {
         s += 1;
      }
      h4[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 = 14;
      }
      if(s!=max) {
         s += 1;
      }
      h5[i].style.fontSize = s+"px"
   }
   for(i=0;i<h6.length;i++) {
      if(h6[i].style.fontSize) {
         var s = parseInt(h6[i].style.fontSize.replace("px",""));
      } else {
         var s = 14;
      }
      if(s!=max) {
         s += 1;
      }
      h6[i].style.fontSize = s+"px"
   }
}

function decreaseFontSize() {
   var p = document.getElementsByTagName('p');
   var li = document.getElementsByTagName('li');
   var h4 = document.getElementsByTagName('h4');
   var h5 = document.getElementsByTagName('h5');
   var h6 = document.getElementsByTagName('h6');
   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!=min) {
         s -= 1;
      }
      p[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 = 14;
      }
      if(s!=min) {
         s -= 1;
      }
      li[i].style.fontSize = s+"px"
   }   
   for(i=0;i<h4.length;i++) {
      if(h4[i].style.fontSize) {
         var s = parseInt(h4[i].style.fontSize.replace("px",""));
      } else {
         var s = 14;
      }
      if(s!=min) {
         s -= 1;
      }
      h4[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 = 14;
      }
      if(s!=min) {
         s -= 1;
      }
      h5[i].style.fontSize = s+"px"
   }
   for(i=0;i<h6.length;i++) {
      if(h6[i].style.fontSize) {
         var s = parseInt(h6[i].style.fontSize.replace("px",""));
      } else {
         var s = 14;
      }
      if(s!=min) {
         s -= 1;
      }
      h6[i].style.fontSize = s+"px"
   }
}
