// this JavaScript code is only needed if you care about this working in IE5/Mac
window.onload = function() {
  if(document.defaultCharset && !window.print && document.body) { // is IE/Mac
    if(location.search.toLowerCase().indexOf('no_js_fix')==-1) {
      window.onresize = function() {
        document.body.style.height=document.body.clientHeight+'px';
        document.body.style.width=document.body.clientWidth+'px';
      }
      window.onresize();
      if(document.getElementById && document.createElement) {
        var box = document.getElementById('toCategoryIndex');
        var a = document.createElement('a');
        a.href='#';
        a.style.display='block';
        a.style.margin='.5em 0';
        var txt = 'Click this to disable the JavaScript Fix.';
        a = box.appendChild(a);
        a.appendChild(document.createTextNode(txt));
        a.onclick=function(){
          var qs =((location.href.indexOf('?')!=-1)?'&':'?')+'no_js_fix';
          location.search += qs;
          return false;
        }
      }
    }
  }
}

