var sp_min=10;
var sp_max=18;
var li_max=13;
var sh_min=12;
var sh_max=24;

function increaseFontSize() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var sp = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var sp = 12;
      }
      if(sp != sp_max) {
         sp += 1;
      }
      
      p[i].style.fontSize = sp+"px";
  }
	var h1 = document.getElementsByTagName('h1');
    for(i=0;i<h1.length;i++) {
		if(h1[i].style.fontSize) {
      		var sh = parseInt(h1[i].style.fontSize.replace("px",""));
  		} else {
	  		var sh = 16;
  		}
  		if(sh != sh_max) {
        	sh += 1;
      	}
		h1[i].style.fontSize = sh+"px";
   }
   
   var h2 = document.getElementsByTagName('h2');
    for(i=0;i<h2.length;i++) {
		if(h2[i].style.fontSize) {
      		var sh2 = parseInt(h2[i].style.fontSize.replace("px",""));
  		} else {
	  		var sh2 = 16;
  		}
  		if(sh2 != sh_max) {
        	sh2 += 1;
      	}
		h2[i].style.fontSize = sh2+"px";
   }
   
   var h3 = document.getElementsByTagName('h3');
    for(i=0;i<h3.length;i++) {
		if(h3[i].style.fontSize) {
      		var sh3 = parseInt(h3[i].style.fontSize.replace("px",""));
  		} else {
	  		var sh3 = 16;
  		}
  		if(sh3 != sh_max) {
        	sh3 += 1;
      	}
		h3[i].style.fontSize = sh3+"px";
   }

   
   var a = document.getElementsByTagName('a');
    for(i=0;i<a.length;i++) {
		if(a[i].style.fontSize) {
      		var sa = parseInt(a[i].style.fontSize.replace("px",""));
  		} else {
	  		var sa = 12;
  		}
  		if(sa != sp_max) {
        	sa += 1;
      	}
		a[i].style.fontSize = sa+"px";
   }
}

function decreaseFontSize() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var sp = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var sp = 12;
      }
      if(sp!=sp_min) {
         sp -= 1;
      }
      p[i].style.fontSize = sp+"px";
   }   
   var h1 = document.getElementsByTagName('h1');
   for(i=0;i<h1.length;i++) {
      if(h1[i].style.fontSize) {
         var sh = parseInt(h1[i].style.fontSize.replace("px",""));
      } else {
         var sh = 12;
      }
      if(sh!=sh_min) {
         sh -= 1;
      }
      h1[i].style.fontSize = sh+"px";
   }   
   var h2 = document.getElementsByTagName('h2');
   for(i=0;i<h2.length;i++) {
      if(h2[i].style.fontSize) {
         var sh2 = parseInt(h2[i].style.fontSize.replace("px",""));
      } else {
         var sh2 = 12;
      }
      if(sh2!=sh_min) {
         sh2 -= 1;
      }
      h2[i].style.fontSize = sh2+"px";
   }   
   
   var h3 = document.getElementsByTagName('h3');
   for(i=0;i<h3.length;i++) {
      if(h3[i].style.fontSize) {
         var sh3 = parseInt(h3[i].style.fontSize.replace("px",""));
      } else {
         var sh3 = 12;
      }
      if(sh3!=sh_min) {
         sh3 -= 1;
      }
      h3[i].style.fontSize = sh3+"px";
   }   
   
   var a = document.getElementsByTagName('a');
   for(i=0;i<a.length;i++) {
      if(a[i].style.fontSize) {
         var sa = parseInt(a[i].style.fontSize.replace("px",""));
      } else {
         var sa = 12;
      }
      if(sa!=sp_min) {
         sa -= 1;
      }
      a[i].style.fontSize = sa+"px";
   }   
}