var selsw0 = 0;
var bgc0 = 0x8888ff;
bgc_chg0();

function bgc_chg0(){
  if (bgc0 == 0x88ffff) selsw0 = 1;
  if (bgc0 == 0x88ff88) selsw0 = 2;
  if (bgc0 == 0xffff88) selsw0 = 3;
  if (bgc0 == 0xff8888) selsw0 = 4;
  if (bgc0 == 0xff88ff) selsw0 = 5;
  if (bgc0 == 0x8888ff) selsw0 = 0;
  if (selsw0 == 0) bgc0 = bgc0 + 0x100;
  if (selsw0 == 1) bgc0 = bgc0 - 0x1;
  if (selsw0 == 2) bgc0 = bgc0 + 0x10000;
  if (selsw0 == 3) bgc0 = bgc0 - 0x100;
  if (selsw0 == 4) bgc0 = bgc0 + 0x1;
  if (selsw0 == 5) bgc0 = bgc0 - 0x10000;
  bcstr = "#" + bgc0.toString(16);
  document.frm1.dsp0.value = bcstr;
  if (document.all) {
    div01.innerHTML = "<font color='"+bcstr+"' style='background-color:#000000;'>リアルタイムに文字色を変更する</font>";
  }
  if (document.layers) {
    document.bgColor = bgc0;
  }
  setTimeout("bgc_chg0()",1);
}

