// Esta função é responsável por abrir o ligthWindow responsável por exibir a página de busca com os respectivos resultados- Início
function busca() {
	
	if( trim($bmGetById('campo_busca').value).length < 3){
                alert('Digite a palavra chave de sua consulta com no mínimo 3 letras'); 
                $bmGetById('campo_busca').focus();
                return false;
        }       
        
        var pub_id        = $bmGetById('pub_id').value;
        var edi_id        = $bmGetById('edi_id').value;
        var palavraChave  = '';
        
	palavraChave      = $bmGetById('campo_busca').value;        	
		
        $bmGetById('campo_busca').value = '';
        
        myLightWindow.activateWindow({
                href: 'busca.htm?pub_id='+pub_id+'&edi_id='+edi_id+'&palavraChave='+palavraChave, 
                title: 'BUSCA',
                width: 760
        });
}
// Esta função é responsável por abrir o ligthWindow responsável por exibir a página de busca com os respectivos resultados- Final


// Esta função é responsável executar a função busca quando o usuário preciona tecla enter no campo de busca - Inicio
function bucarEnter(e){
	if(!e) e = window.event;
	var tecla = (document.all) ? e.keyCode : e.which;
	if(tecla == 13)	busca();
}
// Esta função é responsável executar a função busca quando o usuário preciona tecla enter no campo de busca - Final

// Esta função é responsável por abrir o ligthWindow responsável por exibir a página de indicação - Inicio
function indicar(pagina_num) {

	myLightWindow.activateWindow({
	        href: 'indique.htm?publicacao_id='+$bmGetById('pub_id').value+'&edicao_id='+$bmGetById('edi_id').value+"&pagina_num="+pagina_num, 
	        title: 'INDIQUE',
	        width: 760
	});
}
// Esta função é responsável por abrir o ligthWindow responsável por exibir a página de indicação - Final

// Esta função é responsável por abrir o ligthWindow responsável por exibir a página de comentarios - Inicio
function comentarios( pag_id ) {
	pag_id = 4729;
	
	if( is_numeric(pag_id) ){
	        myLightWindow.activateWindow({
	                href: 'comentarios.php?pag_id='+pag_id, 
	                title: 'Comentï¿œrios [1]',
	                width: 760
	        });
	}
}

// Esta função é responsável por abrir o ligthWindow responsável por exibir a página de comentarios - Final



