function ajustaTextoFocus(campo, texto) {
	if(campo.value == texto)
		campo.value = "";
}
function ajustaTextoBlur(campo, texto) {
	if(campo.value == "")
		campo.value = texto;
}



function validaNews() {

	var email =  $('#email').val();
	
	if(email == "" || email == " " || email == "Assine nossa newsletter") {
		jAlert('Por Favor, Preencha Seu Email');
		$('#email').focus();
		return false;
	}
		
	$.post("../recebeNews.php", { email:email },
	 function(data){
     if (data.enviado != '1') {
		 jAlert('Email j\u00e1 existente. Por Favor, digite outro Email');
		 return false;
	 }else{
		document.formnews.submit(); 
	 }
	 }, "json");
	 
	 return false;
	
}



function validaFormulario() {

    var empresa =  $('#empresa').val();
	
	if(empresa == "" || empresa == " " || empresa == "Empresa") {
		jAlert('Por Favor, Preencha o Nome da Empresa');
		$('#empresa').focus();
		return false;
	}
 
	var email =  $('#email').val();
	
	if(email == "" || email == " " || email == "Email") {
		jAlert('Por Favor, Preencha Seu Email');
		$('#email').focus();
		return false;
	}
	
	var telefone =  $('#itelefone').val();
	
	if(telefone == "" || telefone == " " || telefone == "Telefone") {
		jAlert('Por Favor, Preencha Seu Telefone');
		$('#telefone').focus();
		return false;
	}
	
	
	var cep =  $('#cep').val();
	
	if(cep == "" || cep == " " || cep == "CEP") {
		jAlert('Por Favor, Preencha Seu CEP');
		$('#cep').focus();
		return false;
	}
	
	
	var pais =  $('#pais').val();
	
	if(pais == "" || pais == " " || pais == "Pais") {
		jAlert('Por Favor, Preencha Seu Pa\u00eds');
		$('#pais').focus();
		return false;
	}
	
	
	var estado =  $('#estado').val();
	
	if(estado == "" || estado == " " || estado == "Estado") {
		jAlert('Por Favor, Selecione Seu Estado');
		$('#estado').focus();
		return false;
	}
	
	
	var cidade =  $('#cidade').val();
	
	if(cidade == "" || cidade == " " || cidade == "Cidade") {
		jAlert('Por Favor, Selecione Sua Cidade');
		$('#cidade').focus();
		return false;
	}
	
	
	var assunto =  $('#assunto').val();
	
	if(assunto == "" || assunto == " " || assunto == "Assunto") {
		jAlert('Por Favor, Selecione o Assunto');
		$('#assunto').focus();
		return false;
	}
	
	
	var mensagem =  $('#mensagem').val();
	
	if(mensagem == "" || mensagem == " " || mensagem == "Mensagem") {
		jAlert('Mensagem Vazia');
		$('#mensagem').focus();
		return false;
	}
			
}


