On.fontsiz = 0;
On.fontwate = 0;
On.fontcolor = "white";

function On(tag)
{
	On.fontcolor = document.getElementById(''+tag+'').style.color;
	document.getElementById(''+tag+'').style.color="#800080";
}

function Off(tag)
{
	document.getElementById(''+tag+'').style.color=On.fontcolor;
}

 var step = 0x10;
 var col = 224;
 var maxcolor = 8;
 var tens = 0xE;
 var units = 0x0;  
 
function startAnimation(tag)
{
  var str = new String("");
  var strTens = new String("");
  var strUnits = new String("");
  var tOutStr = new String("");

  col = col - step;
  if (col > maxcolor)
  {
		if( units == 0 )
		{
			units = step;
			tens = tens - 1;
			if( tens == 0 )
			  col = -1;
		}
		else
			units = units - step;

		if (tens == 15)
			strTens = "F";
		else if( tens == 14 )
			strTens = "E";
		else if( tens == 13 )
			strTens = "D";
		else if( tens == 12 )
			strTens = "C";
		else if( tens == 11 )
			strTens = "B";
		else if( tens == 10 )
			strTens = "A";
		else
			strTens = tens;

		if (units == 15)
			strUnits = "F";
		else if( units == 14 )
			strUnits = "E";
		else if( units == 13 )
			strUnits = "D";
		else if( units == 12 )
			strUnits = "C";
		else if( units == 11 )
			strUnits = "B";
		else if( units == 10 )
			strUnits = "A";
		else
			strUnits = units;

		str = "#" + strTens + strUnits + strTens + strUnits + strTens + strUnits;
		document.getElementById(''+tag+'').style.color = str;
		tOutStr="startAnimation(" + "'" + tag + "'" + ")";

		move=setTimeout(tOutStr, 80);	
  }
  else
  {
	clearTimeout(move);
  	document.getElementById(''+tag+'').style.color = "#000000";
  }
}

