function baixa_todos(classe){

  vetor=document.getElementsByTagName("div");

  for(i=0;i<vetor.length;i++){
    if(vetor[i].className==classe){
    vetor[i].style.display='none';
	}
  }
}

function baixa(elemento){
	
		
	if(document.getElementById(elemento).style.display=='none'){
	baixa_todos('azulmenu');
	document.getElementById(elemento).style.display='';
	}else{
	
		document.getElementById(elemento).style.display='none';
	}
//	return false;
}


function verifica_encomende(){
	
	//se vir do modo manual

	
	
	
var nome=document.getElementById('enome').value;
var  titulo=document.getElementById('etitulo').value;
var 	telefone=document.getElementById('etelefone').value;
var 	email=document.getElementById('eemail').value;	
var 	autor=document.getElementById('eautor').value;	
var 	detalhes=document.getElementById('edetalhes').value;	
var tipo=document.getElementById('etipo').value;	

	if(nome.length<3){
		alert('Digite seu nome.');
		return false;		
	}
	if(email.length<5 && telefone.length<5 ){
		alert('Digite seu email ou telefone de contato.');
		return false;		
	}
	if(titulo.length<2 && detalhes.length<3 ){
		alert('Digite o titulo do livro ou outros detalhes.');
		return false;		
	}
	if(tipo.length<3){
		alert('Selecione um tipo: usado, novo ou ambos.');
		return false;		
	}
	
	
	return true;
	
	
	
	
}