var min=8;
var max=18;
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("%",""));
      } else {
         var s = 100;
      }
      if(s!=max) {
         s += 10;
      }
      p[i].style.fontSize = s+"%"
   }
   
   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("%",""));
      } else {
         var s = 118.18;
      }
      if(s!=max) {
         s += 10;
      }
      h1[i].style.fontSize = s+"%"
   }
   
   
   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("%",""));
      } else {
         var s = 100;
      }
      if(s!=max) {
         s += 10;
      }
      h2[i].style.fontSize = s+"%"
   }
   
   var li = document.getElementsByTagName('li');
   for(i=0;i<li.length;i++) {
      if(li[i].style.fontSize) {
         var s = parseInt(li[i].style.fontSize.replace("%",""));
      } else {
         var s = 100;
      }
      if(s!=max) {
         s += 10;
      }
      li[i].style.fontSize = s+"%"
   }
   
   
}
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("%",""));
      } else {
         var s = 100;
      }
      if(s!=min) {
         s -= 10;
      }
      p[i].style.fontSize = s+"%"
   } 
   
   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("%",""));
      } else {
         var s = 118.18;
      }
      if(s!=max) {
         s -= 10;
      }
      h1[i].style.fontSize = s+"%"
   }
   
    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("%",""));
      } else {
         var s = 100;
      }
      if(s!=max) {
         s -= 10;
      }
      h2[i].style.fontSize = s+"%"
   }
   
   var li = document.getElementsByTagName('li');
   for(i=0;i<li.length;i++) {
      if(li[i].style.fontSize) {
         var s = parseInt(li[i].style.fontSize.replace("%",""));
      } else {
         var s = 100;
      }
      if(s!=max) {
         s -= 10;
      }
      li[i].style.fontSize = s+"%"
   }
   
   
     
}
