function check_com(form) { if (form.nombre.value.trim()=="") { DHTMLALERT("Ingresa tu nombre."); form.nombre.focus() return false; } if (form.email.value.indexOf("@") < 0 || form.email.value.indexOf(".") < 0 || form.email.value.indexOf(",") > 0) { alert("Ingrese su e-mail."); form.email.focus(); return false; } if (form.id_pais.value.trim()=="") { DHTMLALERT("La dirección de e-mail es obligatoria."); form.nombre.focus() return false; } if (form.mensaje.value.trim()=="") { DHTMLALERT("Indica el mensaje"); form.mensaje.focus() return false; } document.getElementById("com_submit").disabled=true; return true; } function check_textarea(o) { var val = o.value; if (val.length > 1000) { DHTMLALERT("Has excedido el limite de 1000 caracteres."); o.value = val.substring(0,1000); o.focus() } getObj("contador").innerHTML=1000-parseInt(o.value.length); }