<!-- //
function CheckForm() {
	if (document.frmCadastro.nome.value.length == 0) {
        alert("Preencha o seu nome");
        document.frmCadastro.nome.focus();
        return false;
	} else if (document.frmCadastro.mail.value.length == 0) {
        alert("Preencha o seu e-mail");
        document.frmCadastro.mail.focus();
        return false;
    } else if (document.frmCadastro.mail.value.length > 0 && !(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/.test(document.frmCadastro.mail.value))) {
        alert("Preencha corretamente o seu e-mail");
        document.frmCadastro.mail.focus();
        return false;
	} else if (document.frmCadastro.codigotel.value.length == 0) {
		alert('Preencha o codigo da cidade');
		document.frmCadastro.codigotel.focus();
		return false;
	} else if (isNaN(document.frmCadastro.codigotel.value) || document.frmCadastro.codigotel.value.length < 2 || document.frmCadastro.codigotel.value.length > 3) {
		alert('Preencha corretamente o codigo da cidade');
		document.frmCadastro.codigotel.focus();
		return false;
	} else if (document.frmCadastro.telefone.value.length == 0) {
		alert('Preencha o numero do seu telefone');
		document.frmCadastro.telefone.focus();
		return false;
	} else if (isNaN(document.frmCadastro.telefone.value) || document.frmCadastro.telefone.value.length != 8) {
		alert('Preencha corretamente o numero do seu telefone');
		document.frmCadastro.telefone.focus();
		return false;
	} else if (document.frmCadastro.celular.value.length == 0) {
		alert('Preencha o numero do seu celular');
		document.frmCadastro.celular.focus();
		return false;
	} else if (isNaN(document.frmCadastro.celular.value) || document.frmCadastro.celular.value.length != 8) {
		alert('Preencha corretamente o numero do seu celular');
		document.frmCadastro.celular.focus();
		return false;
	} else if (document.frmCadastro.dia.value.length == 0) {
		alert('Preencha o dia');
		document.frmCadastro.dia.focus();
		return false;
	} else if (isNaN(document.frmCadastro.dia.value) || document.frmCadastro.dia.value < 1 || document.frmCadastro.dia.value > 31) {
		alert('Preencha corretamente o dia');
		document.frmCadastro.dia.focus();
		return false;
	} else if (document.frmCadastro.mes.value.length == 0) {
		alert('Preencha o mes');
		document.frmCadastro.mes.focus();
		return false;
	} else if (isNaN(document.frmCadastro.mes.value) || document.frmCadastro.mes.value < 1 || document.frmCadastro.mes.value > 12) {
		alert('Preencha corretamente o mes');
		document.frmCadastro.mes.focus();
		return false;
    } else {
		document.frmCadastro.submit();
    }
}
// -->