// JavaScript Document
var minpx=8;
var maxpx=18;
var minpct=50;
var maxpct=200;
function increaseFontSize() {
   var c = document.getElementById("container");


      if(c.style.fontSize) {
         var s = parseInt(c.style.fontSize.replace("%",""));
      } else {
         var s = 100;
      }
      if(s!=maxpct) {
         s += 10;
      }
      c.style.fontSize = s+"%"

}

function decreaseFontSize() {
   var c = document.getElementById("container");
      if(c.style.fontSize) {
         var s = parseInt(c.style.fontSize.replace("%",""));
      } else {
         var s = 100;
      }
      if(s!=minpct) {
         s -= 10;
      }
      c.style.fontSize = s+"%"
}



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!=maxpx) {
         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!=minpx) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
   }   
}
