function checkrequired(formulario) { //if (document.images) { for (i=0;i 0) { if (((tempobj.type=="text")||(tempobj.type=="textarea")||(tempobj.type=="password")||(tempobj.type=="file"))&&(valor.length==0)&&(nombre_campo.length >0)){ alert("Por favor introduzca su "+nombre_campo+"."); //tempobj.style.background = "#CCCCCC"; //permitir cambiar el color de fondo del campo tempobj.focus(); return false; } if ((tipo.length > 0)&&(valor.length > 0)) { switch (tipo){ case "num": if (isNaN(valor)) { alert("El campo: "+nombre_campo+" debe ser numérico"); tempobj.select(); return false; } break; case "dts": if (!validar_fecha(tempobj.name, formulario)) { tempobj.select(); return false; } break; case "@@@": var inicio = valor.indexOf("@"); var fin = valor.lastIndexOf("@"); if ((inicio != fin) || ((inicio == -1) && (fin == -1)) || ((inicio == 0) && (fin == 0))|| ((inicio == valor.length-1) && (fin == valor.length-1))){ alert("El valor del campo: "+nombre_campo+" no contiene un formato válido de correo electrónico."); tempobj.select(); return false; } break; case "hhh": var horas=valor.split(":")[0]; var minutos=valor.split(":")[1]; var segundos=valor.split(":")[2]; if (valor.indexOf(":")==-1) { alert("La hora indicada no tiene el formato correcto: hh:mm o hh:mm:ss"); tempobj.select(); return false; } if ((horas > "23")||(horas < "0")) { alert("La parte horaria de la hora es incorrecta.\nLas parte horaria va desde 00 a 23."); tempobj.select(); return false; } if ((minutos > "59")||(minutos < "0")) { alert("Los minutos de la hora son incorrectos."); tempobj.select(); return false; } if ((segundos > "59")||(segundos < "0")) { alert("La segundos de la hora son incorrectos."); tempobj.select(); return false; } break; case "txt": break; case "bit": break; case "ids": break; } } } } //} //fin document.images return true; } function checkrequired_en(formulario) { //if (document.images) { for (i=0;i 0) { if (((tempobj.type=="text")||(tempobj.type=="textarea")||(tempobj.type=="password")||(tempobj.type=="file"))&&(valor.length==0)&&(nombre_campo.length >0)){ alert("Please introduce your "+nombre_campo+"."); //tempobj.style.background = "#CCCCCC"; //permitir cambiar el color de fondo del campo tempobj.focus(); return false; } if ((tipo.length > 0)&&(valor.length > 0)) { switch (tipo){ case "num": if (isNaN(valor)) { alert("Field: "+nombre_campo+" must be numeric"); tempobj.select(); return false; } break; case "dts": if (!validar_fecha(tempobj.name, formulario)) { tempobj.select(); return false; } break; case "@@@": var inicio = valor.indexOf("@"); var fin = valor.lastIndexOf("@"); if ((inicio != fin) || ((inicio == -1) && (fin == -1)) || ((inicio == 0) && (fin == 0))|| ((inicio == valor.length-1) && (fin == valor.length-1))){ alert("Please verify your "+nombre_campo+", actually is not a valid email address."); tempobj.select(); return false; } break; case "hhh": var horas=valor.split(":")[0]; var minutos=valor.split(":")[1]; var segundos=valor.split(":")[2]; if (valor.indexOf(":")==-1) { alert("La hora indicada no tiene el formato correcto: hh:mm o hh:mm:ss"); tempobj.select(); return false; } if ((horas > "23")||(horas < "0")) { alert("La parte horaria de la hora es incorrecta.\nLas parte horaria va desde 00 a 23."); tempobj.select(); return false; } if ((minutos > "59")||(minutos < "0")) { alert("Los minutos de la hora son incorrectos."); tempobj.select(); return false; } if ((segundos > "59")||(segundos < "0")) { alert("La segundos de la hora son incorrectos."); tempobj.select(); return false; } break; case "txt": break; case "bit": break; case "ids": break; } } } } //} //fin document.images return true; } //---------------------- frances ----------------------------------- function checkrequired_fr(formulario) { //if (document.images) { for (i=0;i 0) { if (((tempobj.type=="text")||(tempobj.type=="textarea")||(tempobj.type=="password")||(tempobj.type=="file"))&&(valor.length==0)&&(nombre_campo.length >0)){ alert("Merci de bien vouloir indiquer votre "+nombre_campo+"."); tempobj.focus(); return false; } if ((tipo.length > 0)&&(valor.length > 0)) { switch (tipo){ case "num": if (isNaN(valor)) { alert("Field: "+nombre_campo+" must be numeric."); tempobj.select(); return false; } break; case "dts": if (!validar_fecha(tempobj.name)) { tempobj.select(); return false; } break; case "@@@": var inicio = valor.indexOf("@"); var fin = valor.lastIndexOf("@"); if ((inicio != fin) || ((inicio == -1) && (fin == -1)) || ((inicio == 0) && (fin == 0))|| ((inicio == valor.length-1) && (fin == valor.length-1))){ alert("Merci de bien vouloir indiquer votre "+nombre_campo+"."); tempobj.select(); return false; } break; case "hhh": var horas=valor.split(":")[0]; var minutos=valor.split(":")[1]; var segundos=valor.split(":")[2]; if (valor.indexOf("/")==-1) { alert("Time is not in the correct form: hh:mm o hh:mm:ss"); return false; } if ((horas > "23")||(horas < "0")) { alert("Hours in time is not valid.\nHours from 0 to 23."); tempobj.select(); return false; } if ((minutos > "59")||(minutos < "0")) { alert("Minutes in time are not correct."); tempobj.select(); return false; } if ((segundos > "59")||(segundos < "0")) { alert("Seconds in time are not correct."); tempobj.select(); return false; } break; case "txt": break; //campos de texto //nada case "bit": break; //campos tipo bit //nada case "ids": break; //campos de identificadores //nada } } } } //} //fin document.images return true; }