function ctMakeColors() {
    this.length = 12;
    this[ 0 ] = "f8";
    this[ 1 ] = "f0";
    this[ 2 ] = "e8";
    this[ 3 ] = "e0";
    this[ 4 ] = "d8";
    this[ 5 ] = "d0";
    this[ 6 ] = "c8";
    this[ 7 ] = "c0";
    this[ 8 ] = "b8";
    this[ 9 ] = "b0"; 
    this[ 10 ] = "a8";
    this[ 11 ] = "a0";

    return this;
}

var ctThisC;
var ctThisT;
var ctTCell;
var ctInterval;

ctClrs = ctMakeColors();
ctInterval = 15;

function ctNextColor() {
    ctTCell.style.backgroundColor = "#" + ctClrs[ ctThisC ] + ctClrs[ ctThisC ] + ctClrs[ ctThisC ];
    ctThisC++;

    if( ctThisC == 11 ) {
        window.clearInterval( ctThisT );
    }
}

function ctFadeDk( cell ) {
    ctThisC = 4;
    ctTCell = cell;

    ctThisT = window.setInterval( "ctNextColor()", ctInterval );
}

function ctFadeLt( cell ) {
    ctThisC = 0;
    ctTCell = cell;

    ctThisT =    window.setInterval( "ctNextColor()", ctInterval );
}

function ctUnfadeDk( cell ) {
    window.clearInterval( ctThisT );
    cell.style.backgroundColor = "#d8d8d8";
}

function ctUnfadeLt( cell ) {
    window.clearInterval( ctThisT );
    cell.style.backgroundColor = "#f8f8f8";
}
