var pmin=12;
var h1min=26;
var h2min=20;
var h3min=24;
var limin=12;
var h5min=8;

var pmax=18;
var h1max=30;
var h2max=26;
var h3max=30;
var limax=18;
var h5max=14;

function increaseFontSize() {
   //THIS PART IS FOR ALL P TAGS
	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 = 14;
      }
      if(s!=pmax) {
         s += 1;
      }
      p[i].style.fontSize = s+"px"
   }
	//THIS PART IS FOR ALL H1 TAGS
	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 = 30;
      }
      if(s!=h1max) {
         s += 1;
      }
      h1[i].style.fontSize = s+"px"
   }
	//THIS PART IS FOR ALL H2 TAGS
	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 = 22;
      }
      if(s!=h2max) {
         s += 1;
      }
      h2[i].style.fontSize = s+"px"
   }
	//THIS PART IS FOR ALL H3 TAGS
	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 = 26;
      }
      if(s!=h3max) {
         s += 1;
      }
      h3[i].style.fontSize = s+"px"
   }
	//THIS PART IS FOR ALL LI TAGS
	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("px",""));
      } else {
         var s = 14;
      }
      if(s!=limax) {
         s += 1;
      }
      li[i].style.fontSize = s+"px"
   }
   //THIS PART IS FOR ALL H5 TAGS
	var h5 = document.getElementsByTagName('h5');
   for(i=0;i<h5.length;i++) {
      if(h5[i].style.fontSize) {
         var s = parseInt(h5[i].style.fontSize.replace("px",""));
      } else {
         var s = 10;
      }
      if(s!=h5max) {
         s += 1;
      }
      h5[i].style.fontSize = s+"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 = 14;
      }
      if(s!=pmin) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
   }
	//THIS PART IS FOR ALL H1 TAGS
	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 = 30;
      }
      if(s!=h1min) {
         s -= 1;
      }
      h1[i].style.fontSize = s+"px"
   }
	//THIS PART IS FOR ALL H2 TAGS
	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 = 22;
      }
      if(s!=h2min) {
         s -= 1;
      }
      h2[i].style.fontSize = s+"px"
   }
	//THIS PART IS FOR ALL li TAGS
	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("px",""));
      } else {
         var s = 14;
      }
      if(s!=limin) {
         s -= 1;
      }
      li[i].style.fontSize = s+"px"
   }
	//THIS PART IS FOR ALL h3 TAGS
	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 = 26;
      }
      if(s!=h3min) {
         s -= 1;
      }
      h3[i].style.fontSize = s+"px"
   }
   //THIS PART IS FOR ALL h5 TAGS
	var h5 = document.getElementsByTagName('h5');
   for(i=0;i<h5.length;i++) {
      if(h5[i].style.fontSize) {
         var s = parseInt(h5[i].style.fontSize.replace("px",""));
      } else {
         var s = 10;
      }
      if(s!=h5min) {
         s -= 1;
      }
      h5[i].style.fontSize = s+"px"
   }
}

