bgc_chgj();

function bgc_chgj(){
//現在の時刻の取得＆表示
  gtim0 = new Date();

  rclr = Math.floor(gtim0.getHours() / 24 * 256); //24時間を256色に変換
  gclr = Math.floor(gtim0.getMinutes() / 60 * 256); //60分を256色に変換
  bclr = gtim0.getSeconds();
  bclr = Math.floor(Math.floor(bclr % 20) / 20 * 256); //秒を20種類に分類して256色に変換
  bgc0 = rclr * 0x10000 + gclr * 0x100 + bclr;
  document.frm1.dsp0.value = "#" + bgc0.toString(16);
  document.body.style.backgroundColor = bgc0;
  setTimeout("bgc_chgj()", 1000);
}

