//------------------------------------------------------------------------------
//Requires the six variables to be defined in calling program
// var SCR_timing			= 3000;	//pause timing in milliseconds
//	var SCR_width			= 160;
//	var SCR_height			= 180;
//	var SCR_bgcolor			= 'lightyellow';
//	var SCR_bgimage			= '';		//only if using background image	
// var SCR_messages			= new Array();
// configure the array with contents of the scroller
//------------------------------------------------------------------------------
	var SCR_index;
	if (SCR_messages.length > 1)
		SCR_index = 2;
	else
		SCR_index = 0;
//------------------------------------------------------------------------------
function SCR_StartScroll()
{
	if (isMoz || isSafari)
	{
		SCR_move1(first);
		second.style.top = SCR_height;
		second.style.visibility = 'visible';
	}
	else
	{
		SCR_move3(first);
		second.style.top = SCR_height;
		second.style.visibility = 'visible';
	}
}
//------------------------------------------------------------------------------
function SCR_move1(whichdiv)
{
	tdiv = eval(whichdiv);
	numTop = parseInt(tdiv.style.top);
	
	if (numTop > 0 && numTop <= 5)
	{
		tdiv.style.top = 0;
		setTimeout("SCR_move1(tdiv)",SCR_timing);
		setTimeout("SCR_move2(second)",SCR_timing);
		return;
	}
	
	if (numTop >= tdiv.offsetHeight*-1)
	{
		tdiv.style.top = numTop - 5;
		setTimeout("SCR_move1(tdiv)",100);
	}
	else
	{
		tdiv.style.top = SCR_height;
		tdiv.innerHTML = SCR_messages[SCR_index];
		if (SCR_index == SCR_messages.length-1)
			SCR_index = 0;
		else
			SCR_index++;
	}
}
//------------------------------------------------------------------------------
function SCR_move2(whichdiv)
{
	tdiv2 = eval(whichdiv);
	numTop = parseInt(tdiv2.style.top);
	
	if (numTop > 0 && numTop <= 5)
	{
		tdiv2.style.top = 0;
		setTimeout("SCR_move2(tdiv2)",SCR_timing);
		setTimeout("SCR_move1(first)",SCR_timing);
		return;
	}
	
	if (numTop >= tdiv2.offsetHeight*-1)
	{
		tdiv2.style.top = numTop - 5;
		setTimeout("SCR_move2(second)",100);
	}
	else
	{
		tdiv2.style.top = SCR_height;
		tdiv2.innerHTML = SCR_messages[SCR_index];
		if (SCR_index == SCR_messages.length-1)
			SCR_index = 0;
		else
			SCR_index++;
	}
}
//------------------------------------------------------------------------------
function SCR_move3(whichdiv)
{
	tdiv = eval(whichdiv);
	if (tdiv.style.pixelTop > 0 && tdiv.style.pixelTop <= 5)
	{
		tdiv.style.pixelTop = 0;
		setTimeout("SCR_move3(tdiv)",SCR_timing);
		setTimeout("SCR_move4(second)",SCR_timing);
		return;
	}
	
	if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1)
	{
		tdiv.style.pixelTop -= 5;
		setTimeout("SCR_move3(tdiv)",100);
	}
	else
	{
		tdiv.style.pixelTop = SCR_height;
		tdiv.innerHTML = SCR_messages[SCR_index];
		if (SCR_index == SCR_messages.length-1)
			SCR_index = 0;
		else
			SCR_index++;
	}
}
//------------------------------------------------------------------------------
function SCR_move4(whichdiv)
{
	tdiv2 = eval(whichdiv);
	if (tdiv2.style.pixelTop > 0 && tdiv2.style.pixelTop <= 5)
	{
		tdiv2.style.pixelTop = 0;
		setTimeout("SCR_move4(tdiv2)",SCR_timing);
		setTimeout("SCR_move3(first)",SCR_timing);
		return;
	}
	
	if (tdiv2.style.pixelTop >= tdiv2.offsetHeight*-1)
	{
		tdiv2.style.pixelTop -= 5;
		setTimeout("SCR_move4(second)",100);
	}
	else
	{
		tdiv2.style.pixelTop = SCR_height;
		tdiv2.innerHTML = SCR_messages[SCR_index];
		if (SCR_index == SCR_messages.length-1)
			SCR_index = 0;
		else
			SCR_index++;
	}
}
//------------------------------------------------------------------------------

