var inId;
var outId;
var flashLoops;

function flashOut (refIds)
{
	flashLoops = 4;
	outId = window.setInterval ("flashOutProc ('" + refIds + "')", "75");
}

function flashOutProc (refIds)
{
	var refElms = refIds.split (",");
	if (flashLoops >= 0)
	{
		for (var i = 0;i < refElms.length;i++)
		{
			var refElm = document.getElementById (refElms[i]);
			refElm.style.opacity = flashLoops / 4;
			refElm.style.filter = 'alpha(opacity=' + (flashLoops * 25) + ')';
		}
		flashLoops--;
	}
	else
	{
		endFlashOut ();
	}
}

function flashIn (refIds)
{
	flashLoops = 0;
	inId = window.setInterval ("flashInProc ('" + refIds + "')", "75");
}

function flashInProc (refIds)
{
	var refElms = refIds.split (",");
	if (flashLoops <= 4)
	{
		for (var i = 0;i < refElms.length;i++)
		{
			var refElm = document.getElementById (refElms[i]);
			refElm.style.opacity = flashLoops / 4;
			refElm.style.filter = 'alpha(opacity=' + (flashLoops * 25) + ')';
		}
		flashLoops++;
	}
	else
	{
		endFlashIn ();
	}
}

function endFlashIn ()
{
	window.clearInterval (inId);
}

function endFlashOut ()
{
	window.clearInterval (outId);
}

function hoverImg ()
{
	if (!document.getElementById) return

	var p = document.getElementsByTagName('DIV');
	for (var i = 0;i < p.length;i++)
	{
		if (p[i].className == "cTdHoverBack")
		{
			p[i].onmouseover = function()
			{
				this.className = 'cTdHoverFront';
				this.firstChild.className = 'cImgIndexFront';
			}
			p[i].onmouseout  = function()
			{
				this.className = 'cTdHoverBack';
				this.firstChild.className = 'cImgIndexBack';
			}
		}
	}
}
