function todosFale()
{
	if(document.getElementById('nome').value == "" || document.getElementById('email').value == "" || document.getElementById('mensagem').value == "")
	{
		alert("Todos os campos devem ser preenchidos!");
		return false;
	}
	else
		return true;
}

// FORM AJAX + JQUERY 
function sendForm(idForm, idRetorno, idStatusRetorno, func)
{
	$(idForm).submit(function(){		
		
		var action = $(this).attr('action');
		$("#carregando").show();
				
		$.post(action, $(this).serialize(), 
			function(data){					
				$("#carregando").hide();
				$(idRetorno).html(data);
				$(idRetorno).hide();	
				$(idRetorno).slideDown('slow'); // fadeIn('slow')
				
				var status_retorno = $(idStatusRetorno).text();				
				if(status_retorno == 1) {
					$(idForm).each(function(){						
						this.reset();
						//if(func) func(idForm);
					});					
				}
				//else
					if(func) func(idForm);
			}
		);
		return false;
	});
}
function validaFormStyle(idForm)
{
	$(idForm).find('*').removeClass("campo-erro");
	
	$(".get-campo-erro").each(function() 
	{
		var campo_invalido = $(this).text();
		$("#"+campo_invalido).addClass("campo-erro");
	});
}
