<!--
var grayimg = new Image();
grayimg.src = "images/binclock/binclock_gray.gif";

var redimg = new Image();
redimg.src = "images/binclock/binclock_red.gif";

function binclk()
{
  timenow = new Date();
  liteup("h1", Math.floor(timenow.getHours() / 10));
  liteup("h2", timenow.getHours() % 10);
  liteup("m1", Math.floor(timenow.getMinutes() / 10));
  liteup("m2", timenow.getMinutes() % 10);
  liteup("s1", Math.floor(timenow.getSeconds() / 10));
  liteup("s2", timenow.getSeconds() % 10);
  setTimeout("binclk()", 1000);
  return;
}

function liteup(col, num)
{
  var sq = document.getElementsByTagName("img");
  if (num % 2 == 1) 
  {
    sq[col + "1"].src = redimg.src;
  } else {
    sq[col + "1"].src = grayimg.src;
  }
  if (num == 2 || num == 3 || num == 6 || num == 7) 
  {
    sq[col + "2"].src = redimg.src;
  } else {
    sq[col + "2"].src = grayimg.src;
  }
  if (num <= 7 && num >= 4) 
  {
    sq[col + "4"].src = redimg.src;
  } else {
    sq[col + "4"].src = grayimg.src;
  }
  if (num >= 8) 
  {
    sq[col + "8"].src = redimg.src;
  } else {
    sq[col + "8"].src = grayimg.src;
  }
  return;
}
//-->
