// JavaScript Document
function abre_foto(url){
	
	window.open(url);
	
}
	
	
	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 = "#664500";	
	}
	
	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 = "#664500";	
	}
	
	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.: yourname@yourhost.com";
		msgErro.className = "erro";
		return (false);
	}else{
		email.style.color = "#664500";	
	}
	
	var country = document.getElementById("fone");
	if (theForm.country.value == ""){
		country.style.color = "#ff0000";
		theForm.country.focus();
		//msgErro.innerHTML = "Por favor, verifique o preencimento dos campos indicados e tente novamente.";
		msgErro.className = "erro";
		return (false);
	}else{
		country.style.color = "#664500";	
	}
	
	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 = "#664500";	
	}
	
	
	if (theForm.fone.value.length < 10){
		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 = "#664500";	
	}
	
	
	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 = "#664500";	
	}
	}
	
	
	

	
	
	