function enviarEmail(){
	var campoemail = document.getElementById("email").value;
	var camponome = document.getElementById("nome").value;
	var campoassunto = document.getElementById("assunto").value;
	var campomensagem = document.getElementById("mensagem").value;
	
	if(campoemail==""  || camponome=="" || campoassunto=="" || campomensagem=="") {
		alert("TODOS OS CAMPOS SÃO OBRIGATÓRIOS!");		
    }else{
		document.contato.submit();
	}
	
}
	
function abrirDETGaleria(tipo,id){
	ajaxGet("galeria.php?tipo="+tipo+"&id="+id,document.getElementById("galeria"),false);
}
function openDetalhes(tipo,id){
	ajaxGet("detalhes.php?tipo="+tipo+"&id="+id,document.getElementById("resultado"),false);
	document.getElementById("resultado").style.display="block";	
	document.getElementById("listaFotos").style.display="none";	
}
function fecharDetalhes(){
	document.getElementById("resultado").style.display="none";	
	document.getElementById("listaFotos").style.display="block";	
}
function Exibircomentario(){
	var divComentario = document.getElementById('comentario').style.display;	
	if(divComentario=="none"){
		document.getElementById('comentario').style.display = "block";
	}else{
		document.getElementById('comentario').style.display = "none";
	}
}
function Resize(){
	if(navigator.appName!="Microsoft Internet Explorer"){
	window.moveTo(0,0);
	window.resizeTo(screen.width-1,screen.height-1);
	window.resizeTo(screen.width,screen.height);
	}
}
function fullWindow(pagina, largura, altura) {
	fullWindow = window.open(pagina,'_blank','status=1,resizable=no,scrollbars=no, width='+largura+', height='+altura+', top=0,left=0');	
}
function votar(){
	document.frm_enquete.action="index.php?pag=enquete&escolha=votar";
	document.frm_enquete.submit();
}

function resultado(){
document.frm_enquete.action="index.php?pag=enquete&escolha=resultado";
document.frm_enquete.submit();
}

function pagNewsletters(){
	
	var nome = document.getElementById('nomenews').value;
	var email = document.getElementById('emailnews').value;
	
	if (nome=="" || email==""){
		
		alert('Para realizar o cadastro é preciso preencher os dois campos.. Tente Novamente');
		
	}else{
		
		ajaxGet("cadastro_newsletter.php?nome="+nome+"&email="+email,document.getElementById("resutadoNewsltter"),false);

	}
}
function Clientes(id){
	ajaxGet("clientes_resultado.php?id="+id,document.getElementById("resultadoClientes"),false);
}