

function resize1(id){

	var id1;
	id1=document.getElementsByTagName('p');
	window.alert(id1[1].style.fontSize);
}



var min=12;
var max=30;

function increaseFontSize_original() {
   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 = 16;
      }
      //if(s!=max) {
      //   s += 1;
      //}
      p[i].style.fontSize = s+"px"
   }
}

function decreaseFontSize_original() {
   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 = 16;
      }
      //if(s!=min) {
      //   s -= 1;
      //}
      p[i].style.fontSize = s+"px"
   }   
}

function increaseFontSize(sup_el_id) {
	var div1=document.getElementById(sup_el_id);
   var p = div1.getElementsByTagName('*');
//var b = document.getElementsByTagName('div');
//var p=a;
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 16;
      }
      if(s!=max) {
         s += 1;
      }
      p[i].style.fontSize = s+"px"
   }
}

function decreaseFontSize(sup_el_id) {
	var div1=document.getElementById(sup_el_id);
	var p = div1.getElementsByTagName('*');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 16;
      }
      if(s!=min) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
   }   
}
