var min=8;
var max=18;
function setFontSize(fontSize) {
   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 = fontSize;
      }
      p[i].style.fontSize = s+"px"
   }
   var td = document.getElementsByTagName('td');
   for(i=0;i<td.length;i++) {
      if(td[i].style.fontSize) {
         var s = parseInt(td[i].style.fontSize.replace("px",""));
      } else {
         var s = fontSize;
      }
      td[i].style.fontSize = s+"px"
   }
//   var body = document.getElementsByTagName('body');
//   for(i=0;i<body.length;i++) {
//      if(body[i].style.fontSize) {
//         var s = parseInt(body[i].style.fontSize.replace("px",""));
//      } else {
//         var s = fontSize;
//      }
//      body[i].style.fontSize = s+"px"
//   }
}

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"
   }
   var td = document.getElementsByTagName('td');
   for(i=0;i<td.length;i++) {
      if(td[i].style.fontSize) {
         var s = parseInt(td[i].style.fontSize.replace("px",""));
      } else {
         var s = fontSize;
      }
      td[i].style.fontSize = s+"px"
   }
//   var body = document.getElementsByTagName('body');
//   for(i=0;i<body.length;i++) {
//      if(body[i].style.fontSize) {
//         var s = parseInt(body[i].style.fontSize.replace("px",""));
//      } else {
//         var s = 12;
//      }
//      if(s!=max) {
//         s += 1;
//      }
//      body[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"
   }
   var td = document.getElementsByTagName('td');
   for(i=0;i<td.length;i++) {
      if(td[i].style.fontSize) {
         var s = parseInt(td[i].style.fontSize.replace("px",""));
      } else {
         var s = fontSize;
      }
      td[i].style.fontSize = s+"px"
   }
//   var body = document.getElementsByTagName('body');
//   for(i=0;i<body.length;i++) {
//      if(body[i].style.fontSize) {
//         var s = parseInt(body[i].style.fontSize.replace("px",""));
//      } else {
//         var s = 12;
//      }
//      if(s!=max) {
//         s += 1;
//      }
//      body[i].style.fontSize = s+"px"
//   }
}

function toggleImages(status) {
   var img = document.getElementsByTagName('img');
   for(i=0;i<img.length;i++) {
//alert(img[i].style.visibility.value);
      if(status) {
         img[i].style.display = 'block';
      } else {
         img[i].style.display = 'none';
      }
   }
}