var clockCumulHeight = new Array(
0,839,1045,1520,1520,1520,
2101,2337,2342,2409,2540,2581,2709,2752,2787,2837,3136,3277,3277,3277,
3591,3654,3891,3928,3969,4001,4067,4280,4571,4745,4898,4961,5003,5098,5210,5764,5764,5764,
6097,6142,6274,6617,6889,6926,6985,6992,6992,6992,
7390,7460,7620,7620);

var antiCumulHeight = new Array(
0, 597,749,848,848,848,
1181,1213,1352,1490,1668,2102,2146,2205,2343,2343,2343,
3233,3360,3410,3445,3495,3621,3813,3835,4110,4211,4237,4318,4321,4363,4444,4444,4444,
4941,5223,5500,5590,5679,5697,5767,5826,5918,5928,6003,6106,6106,6106,
6822,7121,7572,7620);

var maxCumulWidth = 7620;
var cumulCount = 0;
var cumulWidthTimer;

function writeCumulGraph()
{
  var d=document;
  var clockTD = (d.all) ? d.all.cumul_clock : d.getElementById("cumul_clock");
  var antiTD = (d.all) ? d.all.cumul_ac : d.getElementById("cumul_ac");
  var clockNameTD = (d.all) ? d.all.clName : d.getElementById("clName");
  var antiNameTD = (d.all) ? d.all.antiName : d.getElementById("antiName");
  var cumulWidth;
  var anticumulWidth;
 
  if(cumulCount < clockCumulHeight.length)
  {
    cumulWidth = (clockCumulHeight[cumulCount] * 450)/maxCumulWidth;
    clockTD.innerHTML = "<img src='..\/pictures\/red.gif' height='15' width='" + cumulWidth + "' \/>";
    anticumulWidth = (antiCumulHeight[cumulCount] * 450)/maxCumulWidth;
    antiTD.innerHTML = "<img src='..\/pictures\/red.gif' height='15' width='" + anticumulWidth + "' \/>";
 
    clockNameTD.innerHTML = clockCumulHeight[cumulCount] + "m " + clockPeakNames[cumulCount];
    antiNameTD.innerHTML =  antiCumulHeight[cumulCount] + "m " + anticlockPeakNames[cumulCount];
    cumulCount++;
    cumulWidthTimer = setTimeout("writeCumulGraph()", 1000);
  }
}

function restCumulGraph()
{
  var d=document;
  var clockTD = (d.all) ? d.all.cumul_clock : d.getElementById("cumul_clock");
  var antiTD = (d.all) ? d.all.cumul_ac : d.getElementById("cumul_ac");
  var clockNameTD = (d.all) ? d.all.clName : d.getElementById("clName");
  var antiNameTD = (d.all) ? d.all.antiName : d.getElementById("antiName");
   
  clockTD.innerHTML = " ";
  antiTD.innerHTML = " ";
  clockNameTD.innerHTML = " ";
  antiNameTD.innerHTML = " ";
  
  cumulCount = 0;
  clearTimeout(cumulWidthTimer);
}

