function drawSecTable2(tbody, C) {
  top.virginTbl &= top.contentFrame.s == 0;
  var c1 = "#fff", c2 = "#eee", c3 = "#ffffcc";
  var even = false;
  var evenColor, oddColor;
  var tr, td;
  for (var i = 0; i < C.length; i++) {
    if (extrName(C[i].n) == "ALL") {
      evenColor = c3;
      oddColor = c3;
    }
    else {
      evenColor = c1;
      oddColor = c2;
    }
    tr = tbody.rows[i];
    tr.style.backgroundColor = even ? evenColor : oddColor;
    td = tr.cells[0];
    td.innerHTML = C[i].n;
    td = tr.cells[1];
    td.innerHTML = top.addCommas(C[i].m.toFixed(0));
    td = tr.cells[2];
    td.innerHTML = C[i].a;
    td = tr.cells[3];
    td.innerHTML = C[i].b == -9999 ? "Min" : C[i].b == 9999 ? "Max" : C[i].b.toFixed(1) + "x";
    td = tr.cells[4];
    td.innerHTML = C[i].h;
    td = tr.cells[5];
    td.innerHTML = C[i].l;
    td = tr.cells[6];
    td.innerHTML = C[i].q;
    td = tr.cells[7];
    td.innerHTML = C[i].x;
    td = tr.cells[8];
    td.innerHTML = C[i].y;
    td = tr.cells[9];
    td.innerHTML = C[i].z;
    td = tr.cells[10];
    td.innerHTML = C[i].p;
    td = tr.cells[11];
    td.innerHTML = C[i].t;
    td = tr.cells[12];
    td.innerHTML = C[i].s;
    td = tr.cells[13];
    td.innerHTML = C[i].w;
    even = !even;
  }
  top.showOrd();
}

// Sorting function dispatcher (invoked by table column links)
function srtSec2(type, tbody, C)
{
  if (top.sTyp == type)
    top.sOrd *= -1;
  else {
    top.delOrd();
    top.sOrd = 1;
    top.sTyp = type;
  }
  setTimeout("top.controlFrame.document.getElementById('progress').style.visibility='hidden'", 300);
  switch (type) {
    case 0 : C.sort(sortBySecName); break;
    case 1 : C.sort(sortByMCap); break;
    case 2 : C.sort(sortByCnt); break;
    case 3 : C.sort(sortByBeta); break; //Cheating: breadth
    case 4 : C.sort(sortByHigh); break;
    case 5 : C.sort(sortByLow); break;
    case 6 : C.sort(sortByChg60); break; //Cheating: gt10
    case 7 : C.sort(sortByChg1); break; //Cheating: gt25
    case 8 : C.sort(sortByChg5); break; //Cheating: gt50
    case 9 : C.sort(sortByChg20); break; //Cheating: gt200
    case 10: C.sort(sortByP); break; //Rest is cheating
    case 11: C.sort(sortByT); break;
    case 12: C.sort(sortBySignal); break;
    case 13: C.sort(sortByVol5); break;
  }
  drawSecTable2(tbody, C)
}

// Sorting functions (invoked by sortTable())
function sortByCnt(a, b) {
    return (b.a - a.a) * top.sOrd;
}
function sortByHigh(a, b) {
    return (b.h - a.h) * top.sOrd;
}
function sortByLow(a, b) {
    return (b.l - a.l) * top.sOrd;
}
