   function base_path(){
    
    var documentBasePath = document.location.href;
    var paths = documentBasePath.split("/");
    
    return paths[0]+"//"+paths[2];
    }
    
function janela(p_pag, p_width, p_heigth) {
    var desktop = window.open(p_pag,'pop','scrollbars=no,location=no,directories=no,status=no,resizable=no,copyhistory=yes,menubar=no,width='+p_width+',height='+p_heigth);
}


    function OnEnter(evt)
    {
        var key_code = evt.keyCode  ? evt.keyCode  :
        evt.charCode ? evt.charCode :
        evt.which    ? evt.which    : void 0;
        
        if (key_code == 13){
            return true;
        }
    }
    
    function EnviaFormulario(e,nomeForm)
    {
        if(OnEnter(e))
        {
            nomeForm.submit();
            return false;
        }
        else
            {
                return true;
            }
    }



/*
* Aumentar Fonte do Texto 
*/

 
var tagAlvo = new Array('p'); //pega todas as tags p//
 
// Especificando os possíveis tamanhos de fontes, poderia ser: x-small, small...
var tamanhos = new Array( '9px','10px','11px','12px','13px','14px','15px' );
var tamanhoInicial = 3;
 
function mudaTamanho( idAlvo,acao ){
  if (!document.getElementById) return
  var selecionados = null,tamanho = tamanhoInicial,i,j,tagsAlvo;
  tamanho += acao;
  if ( tamanho < 0 ) tamanho = 0;
  if ( tamanho > 6 ) tamanho = 6;
  tamanhoInicial = tamanho;
  if ( !( selecionados = document.getElementById( idAlvo ) ) ) selecionados = document.getElementsByTagName( idAlvo )[ 0 ];
  
  selecionados.style.fontSize = tamanhos[ tamanho ];
  
  for ( i = 0; i < tagAlvo.length; i++ ){
    tagsAlvo = selecionados.getElementsByTagName( tagAlvo[ i ] );
    for ( j = 0; j < tagsAlvo.length; j++ ) tagsAlvo[ j ].style.fontSize = tamanhos[ tamanho ];
  }
}
/*
* FIM do Aumentar Fonte do Texto 
*/

/*
* Players Externos 
*/

function exibirLetra(tipo)
{
    //var url = "http://intranet/njb/busca_letras.php?letra="+tipo;
    var url = base_path()+"/busca_letras.php?letra="+tipo;
    window.open(url,'janelaLetra','width=450,height=550,scrollbars=yes,status=no,toolbar=no');
}

function ganhadores( combo ){
  //window.location='http://intranet/njb/Promocao/Ganhadores/'+ combo.value;
  if(combo.value == '5280'){
      window.location=base_path()+'/QuizSOSMundoAnimal';
  }else if(combo.value == 'carioquinha'){
      window.location=base_path()+'/Promocao/ProjetoCarioquinha'
  }else if(combo.value == 'pendrive_jbfm'){
      window.location=base_path()+'/Promocao/PendriveJBFM'
  }else if(combo.value == 'festival'){
      window.location=base_path()+'/Promocao/Festival'
  }else{
  window.location=base_path()+'/Promocao/Ganhadores/'+combo.value;
  }
}

function smooth_jazz(){
    janela(base_path()+'/smooth/player.php', '640', '470');
}

function comentariosReporter(b,m){
    janela(base_path()+'/comments/reporter/index.php?cpatual='+b+'&matual='+m,'600','600')
}

function comentariosPauloMaia(b,m){
    janela(base_path()+'/comments/paulomaia/index.php?cpatual='+b+'&matual='+m,'600','600')
}

function comentariosOPlaneta(b,m){
    janela(base_path()+'/comments/ouvindoplaneta/index.php?cpatual='+b+'&matual='+m,'600','600')
}

function abreCelebrationPlayer() {
        window.open(base_path()+"/ondemand/player_ondemand.php","Celebration","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,top=0,left=0,width=410,height=236")
    }


 



