var min=12;
var max=14;

function increaseFontSize() { 
//call all the function u want here 
increaseFontSizeTD(); 
increaseFontSizeUL(); 
increaseFontSizeH1();
increaseFontSizeH2();
increaseFontSizeP();
}

function decreaseFontSize() { 
//call all the function u want here 
decreaseFontSizeTD(); 
decreaseFontSizeUL(); 
decreaseFontSizeH1();
decreaseFontSizeH2();
decreaseFontSizeP();
}

function increaseFontSizeTD() {
   var td = document.getElementsByTagName('td');
   for(i=0;i<td.length;i++) {
      if(td[i].style.fontSize) {
         var s = parseInt(td[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s += 1;
      }
      td[i].style.fontSize = s+"px"
   }
}
function decreaseFontSizeTD() {
   var td = document.getElementsByTagName('td');
   for(i=0;i<td.length;i++) {
      if(td[i].style.fontSize) {
         var s = parseInt(td[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      td[i].style.fontSize = s+"px"
   }   
}

function increaseFontSizeUL() {
   var ul = document.getElementsByTagName('ul');
   for(i=0;i<ul.length;i++) {
      if(ul[i].style.fontSize) {
         var s = parseInt(ul[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s += 1;
      }
      ul[i].style.fontSize = s+"px"
   }
}
function decreaseFontSizeUL() {
   var ul = document.getElementsByTagName('ul');
   for(i=0;i<ul.length;i++) {
      if(ul[i].style.fontSize) {
         var s = parseInt(ul[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      ul[i].style.fontSize = s+"px"
   }   
}

function increaseFontSizeH1() {
   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 = 12;
      }
      if(s!=max) {
         s += 1;
      }
      h1[i].style.fontSize = s+"px"
   }
}
function decreaseFontSizeH1() {
   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 = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      h1[i].style.fontSize = s+"px"
   }   
}

function increaseFontSizeH2() {
   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 = 12;
      }
      if(s!=max) {
         s += 1;
      }
      h2[i].style.fontSize = s+"px"
   }
}
function decreaseFontSizeH2() {
   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 = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      h2[i].style.fontSize = s+"px"
   }   
}


function increaseFontSizeP() {
   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 = 12;
      }
      if(s!=max) {
         s += 1;
      }
      p[i].style.fontSize = s+"px"
   }
}
function decreaseFontSizeP() {
   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 = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
   }   
}

