function form_validator(theForm)
{
	if(theForm.nome.value == "") {
		alert("Informe o nome!");
		theForm.nome.focus();
	 	return(false); 
	}

	if(theForm.cargo.value == "") {
		alert("Selecione sua função!");
		theForm.cargo.focus();
	 	return(false); 
	}

	if(theForm.assunto.value == "") {
		alert("Selecione o assunto!");
		theForm.assunto.focus();
	 	return(false); 
	}

	if(theForm.email.value == "") {
		alert("E-mail não informado!");
		theForm.email.focus();
	 	return(false); 
	} else if(
	  (theForm.email.value.indexOf('@', 0) == -1) || 
	  (theForm.email.value.length < 5 ) ||
	  (theForm.email.value.indexOf('.', 0) == -1)) {
		 alert("E-mail inválido!");
		 theForm.email.focus();
		 return(false); 
	}

	if(theForm.uf.value == "") {
		alert("Selecione o Estado!");
		theForm.uf.focus();
	 	return(false); 
	}
	
	if(theForm.cidade.value == "") {
		alert("Selecione a Cidade!");
		theForm.cidade.focus();
	 	return(false); 
	}
	
	if(theForm.encontrou.value == "") {
		alert("Informe como nos encontrou!");
		theForm.encontrou.focus();
	 	return(false); 
	}

	if(theForm.mensagem.value == "") {
		alert("Escreva sua mensagem!");
		theForm.mensagem.focus();
	 	return(false); 
	}

	img_code = document.getElementById('img_code');	
	senha_imagem = document.getElementById('senha_imagem');	
	if(senha_imagem.value.toUpperCase() != img_code.value.toUpperCase()) {
		alert("Informe corretamente a sequência de caracteres contida no bloco de imagem.");
		senha_imagem.value="";
		document.getElementById('senha_imagem').focus();
		return(false); 
	} 
						
	return (true);
}


