
function ValidaFale(form){
	if(validaVazio(form.nome, "O campo \"Nome\" é obrigatório."))
	return false;

	if(validaVazio(form.email, "O campo \"E-mail\" é obrigatório."))
	return false;
	
	if(!valida_mail(form.email.value)){
		alert("E-mail inválido.");
		form.email.focus();
		return false;
	}
	
	if(validaVazio(form.assunto, "O campo \"Assunto\" é obrigatório."))
	return false;
	
	form.mensagem.value = trim(form.mensagem.value);
	
	if(validaVazio(form.mensagem, "O campo \"Mensagem\" é obrigatório."))
	return false;
	
}

function CarregaCidades(valor){

	url 	   = "../home/cidades.php?etapa=" + valor;
	tipo    = "retornoCidades()";
	loadXMLDoc(url);
	return false;	
}

function retornoCidades(){
	var texto = req.responseText;
	document.getElementById("HtmlCidades").innerHTML="";
	document.getElementById("HtmlCidades").innerHTML=texto;
}



function CarregaMunicipio(valor){

	url 	= "../home/municipio.php?municipio=" + valor;
	tipo    = "retornoMunicipio()";
	loadXMLDoc(url);
	return false;	
}

function retornoMunicipio(){
	var texto = req.responseText;
	document.getElementById("HtmlEscola").innerHTML="";
	document.getElementById("HtmlEscola").innerHTML=texto;
}












