﻿var min=12;
var max=20;
function increaseFontSize(id) {
   var p = document.getElementById(id);
   if(p.style.fontSize) {
         var s = parseInt(p.style.fontSize.replace("px",""));
      } else {
         var s = 16;
      }
      if(s!=max) {
         s += 1;
      }
      else
      {
        alert("maximum font size reached");
      }
      p.style.fontSize = s+"px"
}
function decreaseFontSize(id) {
   var p = document.getElementById(id);
   if(p.style.fontSize) {
         var s = parseInt(p.style.fontSize.replace("px",""));
      } else {
         var s = 16;
      }
      if(s!=min) {
         s -= 1;
      }
      else
      {
      alert("minimum font-size reached");
      }
      p.style.fontSize = s+"px" 
}