var min=6;
var max=15;
function increaseFontSize() {
   var p = document.getElementsByTagName('body');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("pt",""));
      } else {
         var s = 9;
      }
      if(s!=max) {
         s += 1;
      }
      p[i].style.fontSize = s+"pt"
   }
}
function decreaseFontSize() {
   var p = document.getElementsByTagName('body');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("pt",""));
      } else {
         var s = 9;
      }
      if(s!=min) {
         s -= 1;
      }
      p[i].style.fontSize = s+"pt"
   }   
}

document.onkeydown = function(e) {
        // Si el foco esta en un elemento de formulario NO ejecutamos las acciones de onkeydown
        var focus = null;
        // IE
        try{
                focus = event.srcElement.type;
        }
        // Mozilla
        catch(err){
                focus = e.target.type;
        }

        var form_elements = new Array("text","password","select-one","textarea","button","submit");
        var activar_keydown = true;
        for(var i in form_elements){
                if(form_elements[i] == focus){
                        activar_keydown = false;
                        break;
                }
        }

        if(activar_keydown){
                e = (typeof e == "undefined") ? event : e;
                keyPressed = (typeof e.which == "number") ? e.which : e.keyCode;
                switch(keyPressed){
                        case 37: // <--
                                if(url_prev != undefined){
                                        document.location.href = url_prev;
                                }
                          break;
                        case 39:  // -->
                                if(url_next != undefined){
                                        document.location.href = url_next;
                                }
                          break;
                        case 107: increaseFontSize(); break;
                        case 109: decreaseFontSize(); break;
                }
        }
}