//---------------------------------------------------------------------------------------------
// VALIDAÇÕES 
function vazio (campo, mensagem){
	
	document.getElementById(campo).style.backgroundColor = '';
	if (document.getElementById(campo).value.length==0) {
			document.getElementById(campo).style.backgroundColor = 'red';
			alert("" + mensagem + "");
			document.getElementById(campo).focus();
			return true;
	}
	return false;
}


// VALIDAÇÕES 
function vazioRADIO (campo, mensagem){
	
	document.getElementById(campo).style.backgroundColor = 'SIM';
	if (document.getElementById(campo).value.length==0) {
			document.getElementById(campo).style.backgroundColor = 'red';
			alert("" + mensagem + "");
			document.getElementById(campo).focus();
			return true;
	}
	return false;
}





function email (campo, mensagem){
	document.getElementById(campo).style.backgroundColor = '';
	if (document.getElementById(campo).value.length==0) {
			document.getElementById(campo).style.backgroundColor = 'red';
            alert("" + mensagem + "");
			document.getElementById(campo).focus();
			return true;
	}
	if (document.getElementById(campo).value.indexOf('@', 0) == -1) {
			document.getElementById(campo).style.backgroundColor = 'red';
			alert("O campo E-mail incorreto!");
			document.getElementById(campo).focus();
			return true;
	}
	if (document.getElementById(campo).value.indexOf('.', 0) == -1) {
			document.getElementById(campo).style.backgroundColor = 'red';
			alert("O campo E-mail incorreto!");
			document.getElementById(campo).focus();
			return true;
	}
	return false;
	
}


/*function numero(campo, mensagem){
	document.getElementById(campo).style.backgroundColor = '';
	if(document.getElementById(compo).style.isNaN == 0){
			document.getElementById(campo).style.backgroundColor = 'red';
			alert('O campo ' + mensagem + ' incorreto!');
			document.getElementById(campo).focus();
			return true;
	}
	return true;
}*/

// CAMPOS DA VALIDAÇÃO
/*function validaFormFinanceiro(){
	
	//--------------------------------------------------------------------------
	// Dados Pessoais
	// Dados necessários para efetivação de proposta
	
	if (vazio('nome', 'Informe o nome!')) return false;
	if (email('email', 'Informe o endereco mensagem!')) return false;
	if (numero('numero', 'Informe o endereco mensagem!')) return false;
	//--------------------------------------------------------------------------
	return true;
}*/





//---------------------------------------------------------------------------------------------

