// JavaScript Document


var min=8;
var max=15;
function maintain() {
	
 var h1 = document.getElementsByTagName('h1');
 for(i1=0;i1<h1.length;i1++) {
    //  if(p[i].style.fontSize) {
         
         var s1 = 11;
   //   }
     
      h1[i1].style.fontSize = s1+"px";
   }
   
 var h2 = document.getElementsByTagName('h2');
 for(i2=0;i2<h2.length;i2++) {
    //  if(p[i].style.fontSize) {
         
         var s2 = 11;
   //   }
     
      h2[i2].style.fontSize = s2+"px";
   }
   
 var h3 = document.getElementsByTagName('h3');
 for(i3=0;i3<h3.length;i3++) {
    //  if(p[i].style.fontSize) {
         
         var s3 = 11;
   //   }
     
      h3[i3].style.fontSize = s3+"px";
   }  
 
 var h4 = document.getElementsByTagName('h4');
 for(i4=0;i4<h4.length;i4++) {
      //if(h4[i4].style.fontSize) {
         
         var s4 = 9;
     // }
     
      h4[i4].style.fontSize = s4+"px";
   }

 var p = document.getElementsByTagName('p');
 for(i=0;i<p.length;i++) {
    //  if(p[i].style.fontSize) {
         
         var s = 11;
   //   }
     
      p[i].style.fontSize = s+"px";
   }
}

function increaseFontSize() {
	
      
   var h1 = document.getElementsByTagName('h1');
   for(i1=0;i1<h1.length;i1++) {
      if(h1[i1].style.fontSize) {
         var s1 = parseInt(h1[i1].style.fontSize.replace("px",""));
      } else {
         var s1 = 11;
      }
      if(s1!=max) {
         s1 += 1;
      }
      h1[i1].style.fontSize = s1+"px";
   }
   
   var h2 = document.getElementsByTagName('h2');
   for(i2=0;i2<h2.length;i2++) {
      if(h2[i2].style.fontSize) {
         var s2 = parseInt(h2[i2].style.fontSize.replace("px",""));
      } else {
         var s2 = 11;
      }
      if(s2!=max) {
         s2 += 1;
      }
      h2[i2].style.fontSize = s2+"px";
   }
   
   var h3 = document.getElementsByTagName('h3');
   for(i3=0;i3<h3.length;i3++) {
      if(h3[i3].style.fontSize) {
         var s3 = parseInt(h3[i3].style.fontSize.replace("px",""));
      } else {
         var s3 = 11;
      }
      if(s3!=max) {
         s3 += 1;
      }
      h3[i3].style.fontSize = s3+"px";
   }
   
   var h4 = document.getElementsByTagName('h4');
   for(i4=0;i4<h4.length;i4++) {
      if(h4[i4].style.fontSize) {
         var s4 = parseInt(h4[i4].style.fontSize.replace("px",""));
      } else {
         var s4 = 11;
      }
      if(s4!=max) {
         s4 += 1;
      }
      h4[i4].style.fontSize = s4+"px";
   }
   
   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 = 11;
      }
      if(s!=max) {
         s += 1;
      }
      p[i].style.fontSize = s+"px";
   }
}
function decreaseFontSize() {
	
   var h1 = document.getElementsByTagName('h1');
   for(i1=0;i1<h1.length;i1++) {
      if(h1[i1].style.fontSize) {
         var s1 = parseInt(h1[i1].style.fontSize.replace("px",""));
      } else {
         var s1 = 11;
      }
      if(s1!=min) {
         s1 -= 1;
      }
      h1[i1].style.fontSize = s1+"px";
   }
   
   var h2 = document.getElementsByTagName('h2');
   for(i2=0;i2<h2.length;i2++) {
      if(h2[i2].style.fontSize) {
         var s2 = parseInt(h2[i2].style.fontSize.replace("px",""));
      } else {
         var s2 = 11;
      }
      if(s2!=min) {
         s2 -= 1;
      }
      h2[i2].style.fontSize = s2+"px";
   }
   
   var h3 = document.getElementsByTagName('h3');
   for(i3=0;i3<h3.length;i3++) {
      if(h3[i3].style.fontSize) {
         var s3 = parseInt(h3[i3].style.fontSize.replace("px",""));
      } else {
         var s3 = 11;
      }
      if(s3!=min) {
         s3 -= 1;
      }
      h3[i3].style.fontSize = s3+"px";
   }
   
   var h4 = document.getElementsByTagName('h4');
   for(i4=0;i4<h4.length;i4++) {
      if(h4[i4].style.fontSize) {
         var s4 = parseInt(h4[i4].style.fontSize.replace("px",""));
      } else {
         var s4 = 11;
      }
      if(s4!=min) {
         s4 -= 1;
      }
      h4[i4].style.fontSize = s4+"px";
   } 	

   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 = 11;
      }
      if(s!=min) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px";
   }   
}



