function abre(pUrl,pTit,pLX,pAY)
{
	var xx=0;
	var yy=0;
	window.open(pUrl,pTit,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+pLX+',height='+pAY+',top='+yy+',left='+xx+',screenX='+xx+',screenY='+yy);
}
		
function pop(param, param2, w, h) {
	novaJanela = window.open(param, param2,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=' +w+ ',height=' +h);
}


// Essa função é para abrir pops pelo site em espanhol. Criei para reduzir o tamanho do código de JS, q está chamando uma função para cada pop q abre no site.
// Edgard.
function popesp(param, param2, scroll, w, h) {
	if ( navigator.appName == "Netscape" ) 
	{
		open(param, param2,"scrollbars=" +scroll+ ",width=" +w+ ",height=" +h+ ", screenY=" + (screen.height - h) / 2 + ", screenX=" + (screen.width - w) / 2 );
	} else {
		open(param, param2,"scrollbars=" +scroll+ ",width=" +w+ ",height=" +h+ ", top=" + (screen.height - h) / 2 + ", left=" + (screen.width - w) / 2 );	
	}
}

function abre_creditos()
{
	
	if ( navigator.appName == "Netscape" ) 
	{
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		NS=window.open("/port/pops/creditos/index.htm","creditos","toolbar=0,location=0,directories=0,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=311,height=437,screenX=" + x + ",screenY=" + y);
		NS.focus();
	} else {
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		IE=window.open("/port/pops/creditos/index.htm","creditos","toolbar=0,location=0,maximize=no,directories=0,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=311,height=437,left=" + x + ",top=" + y);
	}
}

function abre_credits()
{
	
	if ( navigator.appName == "Netscape" ) 
	{
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		NS=window.open("/ing/pops/credits/index.htm","creditos","toolbar=0,location=0,directories=0,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=311,height=437,screenX=" + x + ",screenY=" + y);
		NS.focus();
	} else {
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		IE=window.open("/ing/pops/credits/index.htm","creditos","toolbar=0,location=0,maximize=no,directories=0,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=311,height=437,left=" + x + ",top=" + y);
	}
}

function abre_privacidade()
{
	
	if ( navigator.appName == "Netscape" ) 
	{
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		NS=window.open("/port/pops/privacidade/index.htm","privacidade","toolbar=0,location=0,directories=0,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width=450,height=400,screenX=" + x + ",screenY=" + y);
		NS.focus();
	} else {
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		IE=window.open("/port/pops/privacidade/index.htm","privacidade","toolbar=0,location=0,maximize=no,directories=0,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width=450,height=400,left=" + x + ",top=" + y);
	}
}

function abre_privacy()
{
	
	if ( navigator.appName == "Netscape" ) 
	{
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		NS=window.open("/ing/pops/privacy/index.htm","privacy","toolbar=0,location=0,directories=0,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width=450,height=400,screenX=" + x + ",screenY=" + y);
		NS.focus();
	} else {
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		IE=window.open("/ing/pops/privacy/index.htm","privacy","toolbar=0,location=0,maximize=no,directories=0,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width=450,height=400,left=" + x + ",top=" + y);
	}
}

function abre_pop_tabelas(url)
{
	
	if ( navigator.appName == "Netscape" ) 
	{
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		NS=window.open(url,"tabelas","toolbar=0,location=0,directories=0,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width=650,height=460,screenX=" + x + ",screenY=" + y);
		NS.focus();
	} else {
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		IE=window.open(url,"tabelas","toolbar=0,location=0,maximize=no,directories=0,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width=650,height=460,left=" + x + ",top=" + y);
	}
}

function abre_pop_cotacao(url) 
{
	if ( navigator.appName == "Netscape" ) 
	{
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		NS=window.open(url,"cotacao","toolbar=0,location=0,directories=0,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width=530,height=423,screenX=" + x + ",screenY=" + y);
		NS.focus();
	} else {
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		IE=window.open(url,"cotacao","toolbar=0,location=0,maximize=no,directories=0,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width=530,height=423,left=" + x + ",top=" + y);
	}
}

function abre_pop_smartquote(url) 
{
	if ( navigator.appName == "Netscape" ) 
	{
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		NS=window.open(url,"smart","toolbar=0,location=0,directories=0,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width=620,height=350,screenX=" + x + ",screenY=" + y);
		NS.focus();
	} else {
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		IE=window.open(url,"smart","toolbar=0,location=0,maximize=no,directories=0,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width=620,height=350,left=" + x + ",top=" + y);
	}
}

function abre_pop_grafico(url) 
{
	if ( navigator.appName == "Netscape" ) 
	{
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		NS=window.open(url,"grafico","toolbar=0,location=0,directories=0,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=545,height=457,screenX=" + x + ",screenY=" + y);
		NS.focus();
	} else {
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		IE=window.open(url,"grafico","toolbar=0,location=0,maximize=no,directories=0,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=545,height=457,left=" + x + ",top=" + y);
	}
}

function abre_pop_grafico_esp(url) 
{
	if ( navigator.appName == "Netscape" ) 
	{
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		NS=window.open(url,"grafico","toolbar=0,location=0,directories=0,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=545,height=504,screenX=" + x + ",screenY=" + y);
		NS.focus();
	} else {
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		IE=window.open(url,"grafico","toolbar=0,location=0,maximize=no,directories=0,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=545,height=504,left=" + x + ",top=" + y);
	}
}


function abre_pop_historico(url) 
{
	if ( navigator.appName == "Netscape" ) 
	{
		var x = 0;
		var y = 0;
		x = (screen.width - (800)) / 2;
		y = (screen.height - (600)) / 2;
		NS=window.open(url,"historico","toolbar=0,location=0,directories=0,status=no,menubar=no,scrollbars=auto,resizable=yes,copyhistory=yes,width=630,height=440,screenX=" + x + ",screenY=" + y);
		NS.focus();
	} else {
		var x = 0;
		var y = 0;
		x = (screen.width - (800)) / 2;
		y = (screen.height - (600)) / 2;
		IE=window.open(url,"historico","toolbar=0,location=0,maximize=no,directories=0,status=no,menubar=no,scrollbars=auto,resizable=yes,copyhistory=yes,width=630,height=440,left=" + x + ",top=" + y);
	}
}

function abre_pop() 
{
	if ( navigator.appName == "Netscape" ) 
	{
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		NS=window.open("pop/index.asp","eventos","toolbar=0,location=0,directories=0,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width=324,height=362,screenX=" + x + ",screenY=" + y);
		NS.focus();
	} else {
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		IE=window.open("pop/index.asp","eventos","toolbar=0,location=0,maximize=no,directories=0,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width=324,height=362,left=" + x + ",top=" + y);
	}
}
 
function abre_pop_eventos(url) 
{
	
	if ( navigator.appName == "Netscape" ) 
	{
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		NS=window.open(url,"eventos","toolbar=0,location=0,directories=0,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width=500,height=360,screenX=" + x + ",screenY=" + y);
		NS.focus();
	} else {
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		IE=window.open(url,"eventos","toolbar=0,location=0,maximize=no,directories=0,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width=500,height=360,left=" + x + ",top=" + y);
	}
}


function abre_pop_chat(url) 
{

	//var janela = window.open ('about:blank', 'janela', 'width=640,height=480,copyhistory=no,scrollbars=yes,resizable=yes,fullscreen=no,top=150,left=250')

	
	if ( navigator.appName == "Netscape" ) 
	{
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		NS=window.open('about:blank','janela',"toolbar=0,location=0,directories=0,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=650,height=457,screenX=" + x + ",screenY=" + y);
		NS.focus();
	} else {
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		IE=window.open('about:blank','janela',"toolbar=0,location=0,maximize=no,directories=0,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=650,height=465,left=" + x + ",top=" + y);
	}
	document.chat.target = "janela";		
	document.chat.action = url;
	document.chat.submit();
	document.chat.target = "_self"
	
}

function abre_pop_emailalerta(url) 
{
	
	if ( navigator.appName == "Netscape" ) 
	{
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		NS=window.open(url,"emailalerta","toolbar=0,location=0,directories=0,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=500,height=460,screenX=" + x + ",screenY=" + y);
		NS.focus();
	} else {
		var x = 0;
		var y = 0;
		x = (screen.width - (635)) / 2;
		y = (screen.height - (430)) / 2;
		IE=window.open(url,"emailalerta","toolbar=0,location=0,maximize=no,directories=0,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=500,height=460,left=" + x + ",top=" + y);
	}
}

function SubmitPage(campo)
{
	document.fale_conosco.campo.value = campo;
	document.fale_conosco.action = "index.asp";
	document.fale_conosco.submit();
}

function Init(campo)
{
	if (campo == 1)
		document.fale_conosco.dc_mensagem.focus();
	else if (campo == 2)
		document.fale_conosco.cd_filial.focus();
	else
		document.fale_conosco.nm_usuario.focus();
}
//DownloadCenter
function viewHtml(arquivo, idioma)
{
	pagina = "/investidores/en-US/download_frm.asp?dc_arq_srl_arquivo=" + arquivo + "&cd_idioma=" + idioma;
	window.open(pagina, "viewHtml", "top=50,left=50,width=655,height=450,scrollbars=yes")
}

//Informações ao Mercado
    function pop_inf_mercado(cd_noticias, cd_idioma, cd_categoria)
    {
	    pagina = "infmercado/informacoes_ao_mercado.asp?cd_noticias=" + cd_noticias + "&cd_idioma=" + cd_idioma + "&categoria=" + cd_categoria;
	    window.open(pagina, "viewInfMercado", "top=50,left=50,width=640,height=450,scrollbars=yes")
    }


