// JavaScript Document
function valida_contato(formulario_nome){
	var cor_erro ='#1AA54C';	
	with(formulario_nome) {    
		if (customer_nome.value.length < 3) {
				customer_nome.focus();
				alert("É preciso determinar seu nome!");
				customer_nome.style.background = cor_erro;
				return false; 
		} else if (emailv(customer_email) == false) {
			customer_email.focus();
			alert("É preciso determinar o e-mail correto!");
			customer_email.style.background = cor_erro;
			return false; 			 
  		 }
				
	}// with	
			 
}

function valida_indique(formulario_nome){
	var cor_erro ='#1AA54C';	
	with(formulario_nome) {
		if (customer_nome.value.length < 3) {
				customer_nome.focus();
				alert("É preciso determinar seu nome!");
				customer_nome.style.background = cor_erro;
				return false; 
		} else if (emailv(customer_email) == false) {
			customer_email.focus();
			alert("É preciso determinar o e-mail correto!");
			customer_email.style.background = cor_erro;
			return false; 			 
  		 } else if (customer_nome_a.value.length < 3) {
				customer_nome_a.focus();
				alert("É preciso determinar seu nome!");
				customer_nome_a.style.background = cor_erro;
				return false; 
		} else if (emailv(customer_email_a) == false) {
			customer_email_a.focus();
			alert("É preciso determinar o e-mail correto!");
			customer_email_a.style.background = cor_erro;
			return false; 			 
  		 }	
	}// with	
}

function valida_seja_associado(formulario_nome){
	var cor_erro ='#1AA54C';	
	with(formulario_nome) {    
		if (customer_nome_empresa.value.length < 3) {
				customer_nome_empresa.focus();
				alert("É preciso determinar o nome da empresa!");
				customer_nome_empresa.style.background = cor_erro;
				return false; 
		} else if (emailv(customer_email) == false) {
			customer_email.focus();
			alert("É preciso determinar o e-mail correto!");
			customer_email.style.background = cor_erro;
			return false; 			 
  		 }
				
	}// with		
}

function valida_contato_classificado(formulario_nome){
	var cor_erro ='#1AA54C';	
	with(formulario_nome) {    
		if (customer_nome.value.length < 3) {
				customer_nome.focus();
				alert("É preciso determinar seu nome!");
				customer_nome.style.background = cor_erro;
				return false; 
		} else if (emailv(customer_email) == false) {
			customer_email.focus();
			alert("É preciso determinar o e-mail correto!");
			customer_email.style.background = cor_erro;
			return false; 			 
  		 }
	}// with	
}


