// Developer's Site:
//http://www.white-hat-web-design.co.uk/articles/js-fontsize.php

var min=8;
var max=18;

var commaSeparatedValueList = "p,li,a,h1,h2,h3,h4,td,font,b,strong,em,i,span";
var tagList =  commaSeparatedValueList.split(",");

function increaseFontSize() {
   var center_WELL = document.getElementById("centerWell"); 
   
   for (x=0;x<tagList.length;x++){
	   var p = center_WELL.getElementsByTagName(tagList[x]);
	   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(p[i].style.lineHeight) {
	         var l = parseInt(p[i].style.lineHeight.replace("px",""));
	      } else {
	         var l = 12;
	      }
	      if(s!=max) {
	         s += 1;
	         l += 1;
	      }
	      p[i].style.fontSize = s+"px"
	      p[i].style.lineHeight = l+"px"
	   }
   }
}
function decreaseFontSize() {
   var center_WELL = document.getElementById("centerWell"); 
   
   for (x=0;x<tagList.length;x++){
	   var p = center_WELL.getElementsByTagName(tagList[x]);
	   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(p[i].style.lineHeight) {
	         var l = parseInt(p[i].style.lineHeight.replace("px",""));
	      } else {
	         var l = 12;
	      }
	      if(s!=min) {
	         s -= 1;
	         l -= 1;
	      }
	      p[i].style.fontSize = s+"px"
	      p[i].style.lineHeight = l+"px"
	   }  
   } 
}
