/*
  ** NAVEGAÇÃO *********************************
  *  Suporta todos os menus e links especiais  *
  **********************************************
  
  Última alteração: 30/03/2004
  Pelo usuário:		Dorival Teixeira Neto

*/

// Acende o item do menu
function colorize(act,obj){
	 if (act=='in')
	  {
	   obj.style.color = "#0D32A9";
	   obj.style.cursor = "Hand";
	  }
	 if (act=='out')
	 {
	   obj.style.color = "#000000";
	   obj.style.cursor = "Default";
	 }
}


function ActMenu(MenuID,Action){
   if (Action == 'show')
    document.getElementById(MenuID).style.visibility = 'visible';
   if (Action == 'hide')
    document.getElementById(MenuID).style.visibility = 'hidden';
}
// Exibe e oculta
function menus(source,obj,act){
	try{
	   if (navigator.appName=="Netscape"){
		   if (act == 'show')
			document.getElementById(obj).style.visibility = 'visible';
		   if (act == 'hide')
			document.getElementById(obj).style.visibility = 'hidden';
	   }else{
		   if (act == 'show'){
			document.getElementById(obj).style.visibility = 'visible';
			document.source.style.cursor = "Hand";
		   }
		   if (act == 'hide'){
			document.getElementById(obj).style.visibility = 'hidden';
			document.source.style.cursor = "Default";
		   }
	   }//of IF
	}// of TRY
	catch(ex){} //Anula qualquer mensagem de erro
 }


function menuClick(url){
	document.location = url;
}

function indique(URL,Idiom){
   window.open('/portal/pages/email'+Idiom+'.asp?aURL='+URL,'BMFIEMAIL','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=410,height=240')
}

function indiqueBVRJ(URL,Idiom){
   window.open('http://www.bvrj.com.br/pages/email'+Idiom+'.asp?aURL='+URL,'BMFIEMAIL','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=410,height=240')
}

function OpenBRX50(URL){
window.open('http://www.bovespa.com.br/Mercado/RendaVariavel/Indices/DiariaP.asp?Indice=IBrX50&DataDiaria=<%=Day(date) & "/" & Month(date) & "/" & Year(date)%>');
}

/************** CSS ***************/
 var A,B;
 B = 1; //incremento
 A = 2; // fonte inicial

function HideButtons(){
	if(window.btMais) btMais.style.display = "none";
	if(window.btMenos) btMenos.style.display = "none";
}

function increase(){
	if (!window.MCSS){
	  alert('Desculpe,\nEsta função não está disponível para esta página');
	  HideButtons();
	}else{
	  if (A < 4){
	   A = A + B;
	   window.MCSS.href = '/2004/styles/fonte/fonte_' + A + '.css';
	  }
	}
}

function decrease(){
	if (!window.MCSS){
	 alert('Desculpe,\nEsta função não está disponível para esta página');
	 HideButtons();
	 }else{
	 if (A > 1){
	   A = A - B;
	   window.MCSS.href = '/2004/styles/fonte/fonte_' + A + '.css';
	  }
	 }
}