﻿// JavaScript Document
function valida_contato(Form) {


    if (Form.nome.value.length == 0) {
        
        alert('Informe seu nome');
        Form.nome.focus();
        return false;

    }
    
    if (Form.email.value.length == 0) {
        
        alert('Informe o seu e-mail');
        Form.email.focus();
        return false;
    }
    
    if (Form.email.value.indexOf('@', 0) == -1 || Form.email.value.indexOf('.', 0) == -1) {
        
        alert('E-mail incorreto'); 
        Form.email.focus();
        return false;
    }

    if (Form.telefone.value.length == 0) {
        
        alert('Informe seu telefone');
        Form.telefone.focus();
        return false;
    }
    
      
     if (Form.endereco.value.length == 0) {
        alert('Informe o seu endereco');
        Form.endereco.focus();
        return false;
    }
    
    if (Form.bairro.value.length == 0) {
        alert('Informe o bairro');
        Form.bairro.focus();
        return false;
    }

    if (Form.CEP.value.length == 0) {
        alert('Informe o CEP');
        Form.CEP.focus();
        return false;
    }
    
    if (Form.cidade.value.length == 0) {
        alert('Informe a cidade');
        Form.cidade.focus();
        return false;
    }

   
    
    if (Form.assunto.value.length == 0) {
        alert('Informe o assunto');
        Form.assunto.focus();
        return false;
    }

    if (Form.mensagem.value.length == 0) {
        alert('Informe a mensagem que deseja enviar');
        Form.mensagem.focus();
        return false;
    }

  return true;
}

function valida_contato_rapido(Form) {
   if (Form.nome.value.length == 0) {
        alert('Informe seu nome');
        Form.nome.focus();
        return false;
    }
    if (Form.email.value.length == 0) {
        alert('Informe o seu e-mail');
        Form.email.focus();
        return false;
    }
    
    if (Form.email.value.indexOf('@', 0) == -1 || Form.email.value.indexOf('.', 0) == -1) {
        alert('E-mail incorreto'); 
        Form.email.focus();
        return false;
    }
   
	 if (Form.mensagem.value.length == 0) {
        alert('Informe a mensagem');
        Form.mensagem.focus();
        return false;
    }
  return true;
}
