

var fundo = new Array ("Selecione", "Curto Prazo", "Referenciado", "Cambial", "Renda Fixa", "Multimercado", "Ações");

var prodDI = new Array ("Selecione", "Prime FIC Ref. DI", "Prime FIC Ref. DI Special", "Prime FIC Ref. DI Plus");
var linkDI = new Array ("", "fundos_faqdi.asp", "fundos_faqdispecial.asp"  , "fundos_faqplus.asp" , "fundos_faqtopazio.asp" , "fundos_faqplatinum.asp"  , "fundos_faqfederal.asp", "fundos_faqcambial.asp"); 

var prodRF = new Array ("Selecione", "Prime FIC RF", "Prime FIC RF Special", "Prime FIC RF Plus",  "Prime FIC RF Multi-Índices", "Prime FIC FI RF Duration", "Prime FIC RF Crédito Privado");
var linkRF = new Array ("", "fundos_faqrf.asp", "fundos_faqspecialrf.asp", "fundos_faqplusrf.asp",  "fundos_faqmulti.asp", "fundos_faqDuration.asp", "fundos_credPrivado.asp"); 

var prodFB = new Array ("Selecione", "Prime FIC Multimercado", "Prime FIC Multi Allocation","Prime FIC Multi Arbitragem", "Prime FIC Multi Long Short","Prime FIC Principal Protegido", "Prime FIC Multigestores", "Prime FIC Principal Protegido 2", "Prime FIC Mix");
var linkFB = new Array ("", "fundos_faqmultimercado.asp"  , "fundos_faqmultiallocation.asp" ,"fundos_faqmultiarbitragem.asp", "fundos_faqMultLongShort.asp", "fundos_faqMultimercadoprincipal.asp", "fundos_faqMultGestores.asp", "fundos_faqMultimercadoprincipal2.asp", "fundos_faqMultimercadomix.asp"); 

var prodRV = new Array ("Selecione", "Prime FIC FIA Index", "Prime FIC FIA Ibovespa Ativo", "Prime FIC FIA Small Cap", "Prime FIC FIA Dividendos", "Prime FIC FIA ISE", "Prime FIC FIA IBrX-50", "Prime FIC FIA Active", "Prime FIC FIA Infra Estrutura", "Prime FIC FIA Seleção", "Prime FIC FIA Governança Corporativa", "Prime FIC FIA Consumo");
var linkRV = new Array ("", "fundos_fiqindexado.asp"  , "fundos_fiqativo.asp", "fundos_fiqfiasmall.asp", "fundos_fiqdividendos.asp", "fundos_fiqindice.asp", "fundos_fiqIBrX50.asp", "fundos_fiqactive.asp", "fundos_fiqinfraestrutura.asp", "fundos_ficSelecao.asp", "fundos_governanca.asp", "fundos_consumo.asp"); 

var prodCP = new Array ("Selecione", "Prime FIC Curto Prazo");
var linkCP = new Array ("", "fundos_faqcurtoprazo.asp");

var prodC = new Array ("Selecione", "Prime FIC Cambial Dólar"); 
var linkC = new Array ("", "fundos_faqcambial.asp");



var arrayRF;
var arrayDI;
var arrayRV;
var arrayFB;
var arrayCP;
var arrayC;

var frm;

function criaFundo() {
	var i;
  frm = document.formprodutos

	for (i=0; i < 7; i++) 
		{
		frm.cmbFundo.length = 7;
		frm.cmbFundo.options[i].text = fundo[i];
		}
}

function criaArray(){
	var i;
	var j;

	arrayRF = new Array(7);
	for (i=0; i < 7; i++) 
		{
		arrayRF[i] = new Array(7);
		arrayRF[i][0] = i;
		arrayRF[i][1] = prodRF[i];
		arrayRF[i][2] = linkRF[i];
		}
	arrayDI = new Array(4);
	for (i=0; i < 4; i++) 
		{
		arrayDI[i] = new Array(4);
		arrayDI[i][0] = i;
		arrayDI[i][1] = prodDI[i];
		arrayDI[i][2] = linkDI[i];
		}
	arrayRV = new Array(12);
	for (i = 0; i < 12; i++)
		{
		arrayRV[i] = new Array(12);
		arrayRV[i][0] = i;
		arrayRV[i][1] = prodRV[i];
		arrayRV[i][2] = linkRV[i];
		}

	arrayFB = new Array(8);
	for (i = 0; i < 8; i++)
		{
		arrayFB[i] = new Array(8);
		arrayFB[i][0] = i;
		arrayFB[i][1] = prodFB[i];
		arrayFB[i][2] = linkFB[i];
		}


	arrayCP= new Array(2);
	for (i = 0; i < 2; i++)
		{
		arrayCP[i] = new Array(2);
		arrayCP[i][0] = i;
		arrayCP[i][1] = prodCP[i];
		arrayCP[i][2] = linkCP[i];
		}
		
	arrayC= new Array(2);
	for (i = 0; i < 2; i++)
		{
		arrayC[i] = new Array(2);
		arrayC[i][0] = i;
		arrayC[i][1] = prodC[i];
		arrayC[i][2] = linkC[i];
		}


}

// ordem dos produtos
function selProduto() {

	if (frm.cmbFundo.selectedIndex == 0){          
			frm.cmbProduto.length = 1;
			frm.cmbProduto.options[0].text = "Selecione";
		}

	else if (frm.cmbFundo.selectedIndex == 4){
		for (i=0; i < 7; i++) 
			{
			frm.cmbProduto.length = 7;
			frm.cmbProduto.options[i].text = arrayRF[i][1];
			}
		}
	else if (frm.cmbFundo.selectedIndex == 2){
		for (i=0; i < 4; i++) 
			{
			frm.cmbProduto.length = 4;
			frm.cmbProduto.options[i].text = arrayDI[i][1];
			}
		}
		
	else if (frm.cmbFundo.selectedIndex == 6){
		for (i=0; i < 12; i++) 
			{
			frm.cmbProduto.length = 12;
			frm.cmbProduto.options[i].text = arrayRV[i][1];
			}
		}

	else if (frm.cmbFundo.selectedIndex == 5){
		for (i=0; i < 8; i++) 
			{
			frm.cmbProduto.length = 8;
			frm.cmbProduto.options[i].text = arrayFB[i][1];
			}
		}

		
	else if (frm.cmbFundo.selectedIndex == 1){
		for (i=0; i < 2; i++) 
			{
			frm.cmbProduto.length = 2;
			frm.cmbProduto.options[i].text = arrayCP[i][1];
			}
		}

	else if (frm.cmbFundo.selectedIndex == 3){
		for (i=0; i < 2; i++) 
			{
			frm.cmbProduto.length = 2;
			frm.cmbProduto.options[i].text = arrayC[i][1];
			}
		}



}

function selLink(diretorio) {

	var i;
	var strLink;

	if (frm.cmbFundo.selectedIndex == 4){
			i = frm.cmbProduto.selectedIndex;
			strLink = "/br/"+ diretorio +"/"+ arrayRF[i][2];
		}

	else if (frm.cmbFundo.selectedIndex == 2){
			i = frm.cmbProduto.selectedIndex;
			strLink = "/br/"+ diretorio +"/"+ arrayDI[i][2];
		}
	else if (frm.cmbFundo.selectedIndex == 6){
			i = frm.cmbProduto.selectedIndex;
			strLink = "/br/"+ diretorio +"/"+ arrayRV[i][2];
		}	

	else if (frm.cmbFundo.selectedIndex == 5){
			i = frm.cmbProduto.selectedIndex;
			strLink = "/br/"+ diretorio +"/"+ arrayFB[i][2];
		}


	else if (frm.cmbFundo.selectedIndex == 1){
		i = frm.cmbProduto.selectedIndex;
		strLink = "/br/"+ diretorio +"/"+ arrayCP[i][2];
	}

	else if (frm.cmbFundo.selectedIndex == 3){
		i = frm.cmbProduto.selectedIndex;
		strLink = "/br/"+ diretorio +"/"+ arrayC[i][2];
	}

		
	if (frm.cmbFundo.selectedIndex != 0){
			frm.action = strLink;
			frm.submit();
		}
}




