/**/ function pulsar(obj) { if (!obj.checked) return elem=document.getElementsByName(obj.name); for(i=0;i*/ 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,720,600); } /**/ function js_download(idFichero){ //document.location.target="_blank"; document.location.href='/componentes/ficheros/download.php?idFichero=' + idFichero; } function js_download_control(idFichero){ //document.location.target="_blank"; document.location.href='/componentes/ficheros/download_control.php?idFichero=' + idFichero; } function radiotocheck(obj,elemento) { if (!obj.checked) return elem=document.getElementsByName(elemento); for(i=0;i 1)) { alert(error); } else { document.siniestros.action = url; document.siniestros.submit(); } } /**/ function js_zoomText(elemento, accion, fontSizeDefault, elementoPadre){ var midaDefault=100; var midaMax=120; var midaMin=60; var valor = 100; //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; } else valor=actual; obj.style.fontSize=valor+"%"; if (elementoPadre!='null') { alert("entro"); 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, {evalScripts:true,method:'post', asynchronous:true, parameters:parametros, onComplete:function (){$('indicador_updateFontSize').style.display='none';}}); return false; } isAlfanumeric=function(evento) { tecla = (document.all) ? evento.keyCode : evento.which; return ((tecla >= 48 && tecla <= 57) || (tecla >= 65 && tecla <= 90) || (tecla >= 96 && tecla <= 122) || (tecla >= 224 && tecla <= 255) || tecla == 199 || tecla == 209 || tecla == 127 || tecla == 32); } /**/ 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)); } /**/ function js_hideName(divId) { document.getElementById(divId).innerHTML = ''; } /**/ function js_showname(divId,Nom) { document.getElementById(divId).innerHTML = Nom; } /**/ function js_helpWindow(URL) { VentanaAyuda = window.open(URL,'helpWindowMutua','width=402,height=700'); VentanaAyuda.moveTo('0','0'); } /**/ function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i*/ function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i*/ function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i*/ function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } /**/ function js_recargarDiv(divId, url, form) { var parametros = ''; if (form!=undefined) parametros = Form.serialize(form); //alert(parametros); var ajax = new Ajax.Updater(divId,url, {method:'post', asynchronous:true, parameters:parametros, evalScripts:true, onLoading: js_cargando, onComplete: js_completado,encoding: 'iso-8859-15'}); //,encoding: 'iso-8859-15',contentType: 'text/html' } /**/ js_completado = function (peticion) { document.getElementById('recarga').innerHTML=''; } /**/ js_cargando = function () { document.getElementById('recarga').innerHTML=''; }