
	var min=8;
var max=18;
function increaseFontSize() {
   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!=max) {
         s += 1;
      }
      p[i].style.fontSize = s+"px"
	  createCookie("ActiveFontSize",s,1000);

   }
   increaseFontSize2();
}

function increaseFontSize2() {
   var p = document.getElementsByTagName('td');
   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"

   }
   
}


function decreaseFontSize() {
   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!=min) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
	  createCookie("ActiveFontSize",s,1000);
   }   
   decreaseFontSize2();
}

function decreaseFontSize2() {
   var p = document.getElementsByTagName('td');
   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"
   }   
}

function createCookie(cookie_name,value,days) {
    if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));  
    var expires = "; expires="+date.toGMTString();
    }
    else expires = "";
    document.cookie = cookie_name+"="+value+expires+"; path=/";
}

function readCookie(cooke_name) {
    regexpr = cooke_name+ '=(.*?)(;|$)';
    var results = document.cookie.match (regexpr);
    if ( results ) {
        return ( unescape ( results[1] ) );
    }
    else { return null; }
    }

var Currentfontsize = readCookie('ActiveFontSize');

function setnewfontsize() {
	
	if (Currentfontsize!=null) {
		 var p = document.getElementsByTagName('td');
		   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 = Currentfontsize+"px"
		   }   

		   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!=min) {
				 s -= 1;
			  }
			  p[i].style.fontSize = Currentfontsize+"px"
		   }   
	}
	
	
}
