var crn = null;

function setPointer(theRow, thePointerColor, divNum)
{
    if (typeof(theRow.style) == 'undefined' || typeof(theRow.cells) == 'undefined') {
        return false;
    }

    var row_cells_cnt = theRow.cells.length;
    for (var c = 0; c < row_cells_cnt; c++) {
        if(c%2==1)
         theRow.cells[c].bgColor = thePointerColor;
    }
    if(divNum) showD(divNum);
    return true;
} 

function showD(num) {
 if(crn == num) return;
 if(crn != null) hide(crn);
 crn = "bl"+num+"Div";
 show(crn); 
}

var wykres="";

function showChart(x) {
// alert(wykres)
 x = replaceMe(x,'&#281;','e');
 x = x.replace ('.',' ');
 document.location.href='/'+wykres+'?fund='+x;
 //document.location.href='/ChartAppl?fund='+x;
}

function showCSV(val) {
 val = replaceMe(val,' ','_');
 val = replaceMe(val,'&#281;','e');
 window.location.href = "/cu/csv/"+val+".csv";
}


function replaceMe(str, text, by) {
 var pattern = new RegExp (text,'ig');
 return str.replace( pattern, by);
}

function showChartOFE(x) {
// alert(wykres)
 x = replaceMe(x,'&#281;','e');
 x = x.replace ('.',' ');
 document.location.href='/Portal?secId=03BFLQOLE784E3K0G8RQCPAN&fund='+x;
 //document.location.href='/ChartAppl?fund='+x;
}

function showChartFI(x) {
// alert(wykres)
 x = replaceMe(x,'&#281;','e');
 x = x.replace ('.',' ');
 document.location.href='/Portal?secId=73KL3R62K3C13AJNJ2EJEIJ3&fund='+x;
 //document.location.href='/ChartAppl?fund='+x;
}
