/**/ /**/ function js_openWindow(url,ancho,alto,nombre){ if (ancho=='') ancho=500; if (alto=='') alto=500; var left=(screen.width - ancho)/2; var top=(screen.height - alto)/2; opciones='width='+ancho+',height='+alto+',left='+left+',top='+top+',location=no,toolbar=no,status=no,menubar=no,directories=no,resizable=yes,scrollbars=yes,copyhistory=no'; window.open(url,nombre,opciones); } function js_print(url){ //Imprime la parte central del cuerpo de la pagina js_openWindow(url,500,500); } /**/ function js_download(idFichero){ document.location.href='/componentes/ficheros/download.php?idFichero=' + idFichero; } /**/ function js_zoomText(elemento, accion, fontSizeDefault, elementoPadre){ var midaDefault=80; var midaMax=130; var midaMin=50; //inicializaciones obj=document.getElementById(elemento); if (obj.style.fontSize==""){ obj.style.fontSize = fontSizeDefault + "%"; } if (elementoPadre!='null') { objPadre=window.opener.document.getElementById(elementoPadre); if (objPadre.style.fontSize==""){ objPadre.style.fontSize = fontSizeDefault + "%"; } } //valor actual del tamaño del texto actual = parseInt(obj.style.fontSize.replace(/%/g, '')); // el valor del incremento o decremento en el tamaño incremento=10; //accion sobre el texto if(accion=="RESTAURAR"){ valor=midaDefault; } else if(accion=="AUMENTAR" && actualmidaMin){ valor=actual-incremento; } obj.style.fontSize=valor+"%"; if (elementoPadre!='null') { objPadre.style.fontSize=valor+"%"; } // Actualizamos el tamaño de letra en sesión mediante ajax var url = '/componentes/font_size/actualizar.php'; var parametros = 'p_fontSize='+valor; var ajaxUpdate = new Ajax.Updater('div_updateFontSize', url, {method:'post', asynchronous:true, parameters:parametros, onComplete:function (){$('indicador_updateFontSize').style.display='none';}}); return false; } /**/ var nav4 = window.Event ? true : false; function js_acceptNum(evt) { // Nota: Backspace = 8, Enter = 13, '0' = 48, '9' = 57 var key = nav4 ? evt.which : evt.keyCode; return (key <= 13 || (key >= 48 && key <= 57)); }