function _in(id){
  document.getElementById('menu_' + id).className = 'mouseover';
}
function _out(id){
  document.getElementById('menu_' + id).className = '';
}
function f_in(id){

  document.getElementById('f_' + id).style.display = 'block';

}
function f_out(id){
  
  document.getElementById('f_' + id).style.display = 'none';
  
}
function openday(id){
  switch (id){
    case 17:
      window.open('17.html', '_blank', 'width=600, height=400, location=no, menubar=no, toolbar=no');
      
    break;
    case 18:
      window.open('18.html', '_blank', 'width=600, height=400, location=no, menubar=no, toolbar=no');

    break;
    case 19:
      window.open('19.html', '_blank', 'width=600, height=400, location=no, menubar=no, toolbar=no');

    break;
    case 20:
      window.open('20.html', '_blank', 'width=600, height=400, location=no, menubar=no, toolbar=no');

    break;
    case 21:
      window.open('21.html', '_blank', 'width=600, height=400, location=no, menubar=no, toolbar=no');

    break;
  }
}
function valida(){
  formulario = document.forms['preinscripcion'];

  if ( (formulario.nombre.value == "") ||
        (formulario.apellidos.value == "") ||
        (formulario.dni.value == "") ||
        (formulario.nacimiento.value == "") ||
        (formulario.dept.value == "") ||
        (formulario.univ.value == "") ||
        (formulario.direccion.value == "") ||
        (formulario.ciudad.value == "") ||
        (formulario.cp.value == "") ||
        (formulario.telefono.value == "") ||
        (formulario.email.value == "") ||
        (formulario.cv.value == "") )
    alert("All fields required");
  else
    formulario.submit();
}
function valida2(){
  if ( document.forms['preinscripcion'].carta.value == "" )
    alert("Todos los campos son obligatorios");
  else
    document.forms['preinscripcion'].submit();
}
function menu(id){
  document.getElementById('menu_' + id).className = 'mouseover';
  document.getElementById('menu_' + id).onmouseout;
  document.getElementById('menu_' + id).onmouseout = '_in(' + id + ')';
}
function valida3(){
  f = document.forms['evento'];

  if (
    (f.organizacion.value == "") ||
    (f.titulo.value == "") ||
    (f.fecha.value == "") ||
    (f.lugar.value == "") ||
    (f.ciudad.value == "") ||
    (f.destinado.value == "") ||
    (f.organizador.value == "") ||
    (f.direccion.value == "") ||
    (f.telefono.value == "") ||
    (f.email.value == "") ||
    (f.web.value == "") ||
    (f.descripcion.value == "")
  ) alert("Todos los campos son obligatorios");
  else
    f.submit();
}
function valida_taller(){
  f = document.forms['taller'];
  
  if (
    (f.nombre.value == "") ||
    (f.apellidos.value == "") ||
    (f.dni.value == "") ||
    (f.inst.value == "") ||
    (f.univ.value == "") ||
    (f.direccion.value == "") ||
    (f.ciudad.value == "") ||
    (f.cp.value == "") ||
    (f.telefono.value == "") ||
    (f.email.value == "") ||
    (f.motivo.value == "")
  )
    alert("Todos los campos son obligatorios");
  else
    f.submit();
}
