// JavaScript Document

var min=8;
var max=18;
function increaseFontSize() {
   var p = document.getElementsByTagName('p');
   var div = document.getElementsByTagName('div');
   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"
   }
   for(i=0;i<div.length;i++) {
	  if (div[i].className == "texto_materia") {
		if(div[i].style.fontSize) {
			var s = parseInt(div[i].style.fontSize.replace("px",""));
		} else {
			var s = 12;
		}
		if(s!=max) {
			s += 1;
		}
		div[i].style.fontSize = s+"px"
	  }
   }
}
function decreaseFontSize() {
   var p = document.getElementsByTagName('p');
   var div = document.getElementsByTagName('div');
   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"
   }   
   for(i=0;i<div.length;i++) {
     if (div[i].className == "texto_materia") {
      if(div[i].style.fontSize) {
         var s = parseInt(div[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      div[i].style.fontSize = s+"px"
	 }
   }   
}

