function muestramas() { window.open("agenda_enviar.asp", null,"scrollbars=yes,resizable=no,toolbar=no,location=no,directories=no,menubar=no,width=450,height=400"); } function calend(s,t) { calendario = window.open("/web/functions/calendario.asp?caso=1&fecha=" + t.value + "&campo=" + t.name + "&formulario=" + s.name,"calendario","width=300,height=250"); } function busca(t) { errores = ""; t.submit(); //seleccionado(t.id_provincia,"PROVINCIA"); /* esta_vacio(t.fecha,"DIA"); if (chequea()) { t.submit(); } else { alert("Por favor, corrija los siguientes fallos:" + errores); }*/ } function registraCalendarios() { var este = new Date().getFullYear(); var rangeyears = [este-100, este]; setupCalendar(document.getElementById("fecNac"), rangeyears); } if (window.addEventListener) { window.addEventListener("load", registraCalendarios, false); } else { window.attachEvent("onload", registraCalendarios); } function getSelected(opt) { var selected = new Array(); var index = 0; for (var intLoop = 0; intLoop < opt.length; intLoop++) { if (opt[intLoop].selected) { index = selected.length; selected[index] = new Object; selected[index].value = opt[intLoop].value; selected[index].index = intLoop; } } //alert(index) //return selected; return index; } function outputSelected(opt) { var sel = getSelected(opt); var strSel = ""; for (var item in sel) strSel += sel[item].value + "\n"; alert("Selected Items:\n" + strSel); } function crear(t){ errores = ""; esta_vacio(t.email,'EMAIL'); esta_vacio(t.nombre,'NOMBRE'); esta_vacio(t.password,'CONTRASEÑA'); esta_vacio(t.comentLaboral,'POR QUE QUIERES COLABORAR COMO VOLUNTARIO'); if (t.password.value!=t.rcontrasena.value){ errores=errores+"\n - Las contraseñas no coinciden"; } var fechaNac = document.getElementById("fecNac"); var validDateNac = isValidDate(fechaNac.value); if(!validDateNac && fechaNac.value != ""){ errores+="\n - El campo 'FECHA DE NACIMIENTO' no es una fecha correcta. Recuerda que debe tener el formato dd/mm/yyyy"; } seleccionado2(t.areasSelec,'TEMAS ASESORAR o AREAS'); //seleccionado(t.areas,'TEMAS ASESORAR') //var areas=getSelected(t.areas.options) //alert (areas) //if (areas >1) { // errores=errores+"\n - Selecciona un máximo de dos áreas" //} /*if (t.datos.checked){ errores=errores; } else { errores=errores + '\n - Debes aceptar la POLÍTICA DE PROTECCIÓN DE DATOS PERSONALES' }*/ //seleccionado(t.tipo,'ASESOR CRUZ ROJA') seleccionado(t.sexo,'HOMBRE/MUJER'); seleccionado(t.nacionalidad,'NACIONALIDAD'); seleccionado(t.pais,'DÓNDE VIVES'); //seleccionado(t.situacion_laboral,'ENTIDAD COLABORADORA') cuenta_caracteres(t.comentarios,'COMENTARIOS',100); cuenta_caracteres(t.comentLaboral,'COLABORAR COMO VOLUNTARIO',100); email(t.email,'EMAIL'); /*var areas=getSelected(t.areasSelec.options); if (areas >1) { errores=errores+"\n - Selecciona un máximo de dos TEMAS ASESORAR o ÁREAS"; }*/ /*alert(t.areasSelec.selectedIndex); if(selectedIndex>2){ errores=errores + '\n - Seleccione un máximo de 2 areas' }*/ if(chequea()) t.submit(); else alert("Por favor, corrija los siguientes fallos:" + errores); } function Select3_onchange(t) { if (t.pais.value==idPaisEspanya){ t.provincia.disabled=false; } else { t.provincia.selectedIndex=0; t.provincia.disabled=true; } }