// ************************************
/* Instructions

   This code performs a fading purple hilight on TD elements in a table.
   Items to be affected should be TD elements with a default color of #FFCCFF,
   and the following attributes:
   
   	   onmouseover = "menuitem_hilite_focus(this)"
	   onmouseout = "menuitem_hilite_blur(this)"
	   style="cursor:pointer" 
*/
// ************************************

// ************************************
// Initialization
// ************************************

var navitems = document.all.tags ("TD");
for (var i=0; i<navitems.length; i++)
	navitems [i]._stage = 0;

_navitem_colors = new Array ("CC", "BB", "AA", "99", "88", "77", "66", "55", "44", "33", "22", "11");
_navitem_color2 = new Array ("FF", "EE", "DD", "BB", "AA", "99", "77", "66", "55", "33", "22", "11");
_navitem_timer = false;
_navitem_timeout = 25;
_linkcolor_over = "#FF0000";
_linkcolor_out = "#FFCCFF";
_linkcolor_purple = "#FF00FF";
_mastermember = null;


// ************************************
// Global Methods
// ************************************

function menuitem_hilite_focus (item)
{
	item.style.color = "#FF0000";
	item._stage = 0;
}

function menuitem_hilite_blur (item)
{
	item.style.color = "#FF1111";
	item._stage = 11;
	
	if (_navitem_timer == false)
	{
		window.setTimeout ("menuitem_hilite_timer ()", _navitem_timeout);
		_navitem_timer = true;
	}	
}

function menuitem_hilite_timer ()
{
	var contimer = false;
	var navitems = document.all.tags ("TD");
	for (var i=0; i<navitems.length; i++)
	{
		var item = navitems [i];
		if (item._stage > 0)
		{
			item._stage--;
			if (item._stage == 0)
				item.style.color = _linkcolor_out;
			else
				item.style.color = "#FF" + _navitem_colors [item._stage] + _navitem_color2 [item._stage];
			contimer = true;
		}
	}

	if (contimer)
		window.setTimeout ("menuitem_hilite_timer ()", _navitem_timeout);
	else
		_navitem_timer = false;
}
