// JavaScript Document
function abre_foto(url){
	
	window.open(url,"Janela","toolbar=no, scrollbars=no");
	
	}
	
	function abremapa(url){
	
	window.open(url,"Janela","width=425, height= 348, toolbar=no, scrollbars=no");
	
	}
	
	function valida(theForm){
	
	var msgErro = document.getElementById("msgErro");
	msgErro.innerHTML = "";
	msgErro.className = "";
	
	var nome = document.getElementById("nome");
	if (theForm.nome.value == ""){
		nome.style.color = "#ff0000";
		theForm.nome.focus();
		msgErro.innerHTML = "Por favor, verifique o preencimento dos campos indicados e tente novamente.";
		msgErro.className = "erro";
		return (false);
	}else{
		nome.style.color = "#666666";	
	}
	
	var email = document.getElementById("email");
	if (theForm.email.value == ""){
		email.style.color = "#ff0000";
		theForm.email.focus();
		msgErro.innerHTML = "Por favor, verifique o preencimento dos campos indicados e tente novamente.";
		msgErro.className = "erro";
		return (false);
	}else{
		email.style.color = "#666666";	
	}
	
	parte1 = theForm.email.value.indexOf("@");
	parte2 = theForm.email.value.indexOf(".");
	parte3 = theForm.email.value.length;
	if (!(parte1 >= 3 && parte2 >= 6 && parte3 >= 9)) {
		email.style.color = "#CC0000";
		theForm.email.focus();
		msgErro.innerHTML = "Ex.: seunome@dominio.com.br";
		msgErro.className = "erro";
		return (false);
	}else{
		email.style.color = "#666666";	
	}
	
	var ddd = document.getElementById("ddd");
	if (theForm.ddd.value == ""){
		ddd.style.color = "#ff0000";
		theForm.ddd.focus();
		msgErro.innerHTML = "Por favor, verifique o preencimento dos campos indicados e tente novamente.";
		msgErro.className = "erro";
		return (false);
	}else{
		ddd.style.color = "#666666";	
	}
	
	var fone = document.getElementById("fone");
	if (theForm.fone.value == ""){
		fone.style.color = "#ff0000";
		theForm.fone.focus();
		msgErro.innerHTML = "Por favor, verifique o preencimento dos campos indicados e tente novamente.";
		msgErro.className = "erro";
		return (false);
	}else{
		fone.style.color = "#666666";	
	}
	
	

	var msg = document.getElementById("msg");
	if (theForm.msg.value == ""){
		msg.style.color = "#ff0000";
		theForm.msg.focus();
		msgErro.innerHTML = "Por favor, verifique o preencimento dos campos indicados e tente novamente.";
		msgErro.className = "erro";
		return (false);
	}else{
		msg.style.color = "#666666";	
	}
	}