function validarEmail(id) {
  var valor = $F(id);
  if (valor.length > 0)
   if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(valor))
    return true;
   else {
     setTimeout("document.getElementById('" + id + "').focus();", 1);
     setTimeout("document.getElementById('" + id + "').select();", 1);
     new Effect.Highlight($(id), {
                                     startcolor:'#FF0000', 
                                     endcolor:'#FFDDDD', 
                                     duration: 1
                                    }
                         );
     id = id.replace("mail", "rut");
     $(id + "MSG").innerHTML = "Incorrect email format"
    }
 }
