// JavaScript Document
function envia_contato(){

	var strObjetivo
	var strEmail
	var strAreadeContato
	var strAssunto
	var strMensagem
	
	strObjetivo=document.formulario_contato.txtObjetivo.value;
	strEmail=document.formulario_contato.txtEmail.value;
	strAreadeContato=document.formulario_contato.txtEmailAreaClube.value;
	strAssunto=document.formulario_contato.txtAssunto.value;
	strMensagem=document.formulario_contato.txtMensagem.value;
	
	if(strObjetivo==""){
		alert("Escolha um objetivo para o contato.");
		return false;
	}
	else if(strEmail.indexOf("@")<0){
		alert("Campo email com preenchimento incorreto.");
		return false;
	}
	else if(strEmail.indexOf(".br")<0 && strEmail.indexOf(".com")<0 && strEmail.indexOf(".com.br")<0 && strEmail.indexOf(".net")<0 && strEmail.indexOf(".org")<0 && strEmail.indexOf(".org.br")<0 && strEmail.indexOf(".gov.br")<0){
		alert("Campo email com preenchimento incorreto.");
		return false;
	}
	else if(strEmail.indexOf(".@")>0 && strEmail.indexOf("@.")>0 && strEmail.indexOf(" ")>0){
		alert("Campo email com preenchimento incorreto");
		return false;
	}
	else if(strAreadeContato==""){
		alert("Informe a área do clube para onde seu email será encaminhado.");
		return false;
	}
	else if(strAssunto==""){
		alert("Informe o assunto do email.");
		return false;
	}
	else if(strMensagem==""){
		alert("O campo de mensagem tem o preenchimento obrigatório");
		return false;
	}
	else{
		document.formulario_contato.submit();
	}
}

function album(folder,evento,opener){
	window.open('../imagens/galerias/index.php?folder='+folder+'&evento='+evento+'&opener='+opener,'Galerias','toolbars=0,height=425px,width=650px,top=0,left=50');	
	void(0);
}

function resultados(){
	window.open('site/php/resultados.php','resultados','toolbars=0, left=300px, top=113px, width=350px, height=450px'); 
	void(0);
}

