// JavaScript Document // SCRIPT QUE DESHABILITA LA TECLA F11 :) document.onkeydown=function () { //alert(event.keyCode);//con esto sabes el valor numerico de la funcion que quieres deshabilitar if(event.keyCode==122)//al valor numerico que acabamos de hayar//) { event.keyCode=0; return false; } } var texto=' Sistema de gestión de información para su Taller vía WEB '; var longitud=texto.length; // FUNCION PARA DESHABILITAR EL CLICK DERECHO DEL MOUSE function clickIE() { if (document.all) { return false; } } function clickNS(e) { if (document.layers || (document.getElementById && !document.all)) { if (e.which == 2 || e.which == 3) { return false; } } } if (document.layers) { document.captureEvents(Event.MOUSEDOWN); document.onmousedown = clickNS; } else { document.onmouseup = clickNS; document.oncontextmenu = clickIE; } document.oncontextmenu = new Function('return false'); // FUNCION QUE HACE EL SCROLL DE LA PANTALLA EN LA PARTE DE ABAJO function scroll() { texto=texto.substring(1,longitud-1)+texto.charAt(0); window.status = texto; setTimeout('scroll()',150); } // FUNCION PARA CENTRAR UNA VENTANA EN LA PANTALLA function centrar() { iz=(screen.width-document.body.clientWidth) / 2; de=(screen.height-document.body.clientHeight) / 2; moveTo(iz,de); } // VALIDACION PARA NUMEROS ENTEROS function LP_numEnt() { var key=window.event.keyCode;//codigo de tecla.s if (key < 48 || key > 57) { //si no es numero window.event.keyCode=0;//anula la entrada de texto. } } // VALIDACION PARA NUMEROS DECIMALES function LP_numDec() { var key=window.event.keyCode;//codigo de tecla. if ((key < 48 || key > 57) && key != 46 ) { //si no es numero o el punto decimal window.event.keyCode=0;//anula la entrada de texto. } } // VALIDACION PARA CADENAS SIMPLES function LP_cadSim() { var key=window.event.keyCode;//codigo de tecla. if ((key < 65 || key > 90) && (key < 97 || key > 122) && key != 32 && key != 209 && key != 241 ) { //si no es caracter window.event.keyCode=0;//anula la entrada de texto. } } // VALIDACION PARA CADENAS DE TIPO VIN function LP_cadVIN() { var key=window.event.keyCode;//codigo de tecla. if ((key < 65 || key > 90) && (key < 97 || key > 122) && (key < 48 || key > 57)) { //si no es caracter window.event.keyCode=0;//anula la entrada de texto. } } // VALIDACION PARA SOLO CADENAS, NUMEROS y '-' function LP_cadCom() { var key=window.event.keyCode;//codigo de tecla. if ((key < 65 || key > 90) && (key < 97 || key > 122) && (key < 48 || key > 57) && key != 45 && key != 209 && key != 241 ) { //si no es caracter que se requiere window.event.keyCode=0;//anula la entrada de texto. } } // VALIDACION PARA SOLO CADENAS, NUMEROS, '-', '.' Y EL ESPACIO EN BLANCO function LP_cadTex() { var key=window.event.keyCode;//codigo de tecla. if ((key < 65 || key > 90) && (key < 97 || key > 122) && (key < 48 || key > 57) && key != 32 && key != 45 && key != 46 && key != 209 && key != 241 ) { //si no es caracter que se requiere window.event.keyCode=0;//anula la entrada de texto. } } // VALIDACION PARA SOLO CADENAS, NUMEROS, '-', '.', '-' : PARA EL CORREO; '@' function LP_cadMail() { var key=window.event.keyCode; //codigo de tecla. if ((key < 64 || key > 90) && (key < 97 || key > 122) && (key < 48 || key > 57) && key != 45 && key != 46 && key != 95 && key != 209 && key != 241 ) { //si no es caracter que se requiere window.event.keyCode=0; //anula la entrada de texto. } } // CERRAR LAS VENTANAS INDEPENDIENTES QUE SE ABREN Y ACTUALIZAR LA PRINCIPAL MADRE function cerrarF() { window.opener.document.forms[0].submit(); window.close(); }