title: Font Resizer Javascript Not Working In IE8 and IE7
body: <p>I am trying to put a font-resizer on my company' website since a lot of our customers are the elderly and they have no idea about Ctrl + "+".</p>
  
  <p>Here are the codes we have. The resizer works fine under FF, Chrome, and IE9. But not in IE8 and IE7. I omit the create cookies/read cookies parts here.</p>
  
  <pre><code>function createCookie(name,value,days) {.....codes for create cookies......}
  
  function changeFont(incfont) {
      try{
          var p = document.getElementsByClassName('resizable');
          for(n=0; n&lt;p.length; n++) {
              if(p[n].style.fontSize) {
                  var size = parseInt(p[n].style.fontSize.replace("px", ""));
              } else {
                  var size = parseInt(window.getComputedStyle(p[n],null).getPropertyValue('font-size').replace("px", ""));
              }
              p[n].style.fontSize = size+ incfont + 'px';
          }
  
          p = document.getElementsByTagName('p');
          for(n=0; n&lt;p.length; n++) {
              if(p[n].style.fontSize) {
                  var size = parseInt(p[n].style.fontSize.replace("px", ""));
              } else {
                  var size = parseInt(window.getComputedStyle(p[n],null).getPropertyValue('font-size').replace("px", ""));
              }
              p[n].style.fontSize = size+ incfont + 'px';
          }
      } catch(err) {}
  }
  
  function readCookie(name) { ....code for read cookies ....}
  
  function increaseFontSize() {
      var inc=0;
      try {
          var x = readCookie('textsize')
          if (x &amp;&amp; x!=0) {
              x = parseInt(x);
              inc = x;
          }
      } catch (e) {}
  
      if (inc&lt;3) {
          inc++;
          changeFont(1);
          createCookie('textsize',inc,1);
      }
  }
  
  function decreaseFontSize() {
      var inc=0;
      try {
          var x = readCookie('textsize')
          if (x &amp;&amp; x!=0) {
              x = parseInt(x);
              inc = x;
          }
      } catch (e) {}
  
      if (inc&gt;0) {
          inc--;
          changeFont(-1);
          createCookie('textsize',inc,1);
      }
  }
  </code></pre>
  
  <p>Thanks in advance!
  YN</p>