var min=9;
var max=18;
function increaseFontSize() {
   changeFontSize('font','increase');
   changeFontSize('td','increase');
   changeFontSize('p','increase');
   changeFontSize('a','increase');  
   changeFontSize('div','increase');  
}

function decreaseFontSize() {
   changeFontSize('font','decrease');
   changeFontSize('td','decrease');
   changeFontSize('p','decrease');
   changeFontSize('a','decrease');  
   changeFontSize('div','decrease');  

}


function resetFontSize() {
   changeFontSize('font','reset');
   changeFontSize('td','reset');
   changeFontSize('p','reset');
   changeFontSize('a','reset');  
      changeFontSize('div','reset');  

}


function changeFontSize(tg,type)
{

var p = document.getElementsByTagName(tg);
   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(type=="increase")
      {
	      if(s!=max) {
	         s += 1;
	      }
      }
      
      else if(type=="decrease")
      {
	       if(s!=min) {
	         s -= 1;
	      }
      }
      
      else if(type=="reset")
      {	       
	         s = 12;
	      
      }


      
      
      p[i].style.fontSize = s+"px"
   }
}
