//  Do not change this variable
var boolScrollPause = false;

//  Change this one if you don't want the text to pause on mouse over
var boolAllowScrollPause = true;

function ScrollInit(strScrollField)
{
	strScrollText = document.getElementById(strScrollField).innerHTML;

	intScrollSpeed = 2;
	intNSScroll = 0;

	boolIsNetscape = false;

	boolScrollSupported = false;
	intScrollWidth = document.getElementById(strScrollField).style.width;
	img = "<img src=ticker_space.gif width="+intScrollWidth+"p height=0>";

	if (navigator.userAgent.indexOf("Firefox")!=-1 || navigator.userAgent.indexOf("Safari")!=-1)
	{
		document.getElementById(strScrollField).innerHTML = "<TABLE  cellspacing='0' cellpadding='0' width='100%'><TR><TD nowrap='nowrap'>"+img+"<SPAN ID='"+strScrollField+"Body' width='100%' onmouseover='boolScrollPause=true' onmouseout='boolScrollPause=false'>&nbsp;</SPAN>"+img+"</TD></TR></TABLE>";
		boolScrollSupported = true;
	}
	if (navigator.userAgent.indexOf("MSIE")!=-1 && navigator.userAgent.indexOf("Opera")==-1)
	{
		document.getElementById(strScrollField).innerHTML = "<DIV nowrap='nowrap' style='width:100%;'>"+img+"<SPAN ID='"+strScrollField+"Body' width='100%' onmouseover='boolScrollPause=true' onmouseout='boolScrollPause=false'></SPAN>"+img+"</DIV>";
		boolScrollSupported = true;
	}
	if (navigator.userAgent.indexOf("Netscape/7")!=-1 || navigator.userAgent.indexOf("Netscape/8")!=-1)
	{
		document.getElementById(strScrollField).innerHTML = "<TABLE  cellspacing='0' cellpadding='0' width='100%'><TR><TD nowrap='nowrap'>"+img+"<DIV ID='"+strScrollField+"Body' width='100%' onmouseover='boolScrollPause=true' onmouseout='boolScrollPause=false' style='position:relative;'>&nbsp;</DIV>"+img+"</TD></TR></TABLE>";
		boolScrollSupported = true;
		boolIsNetscape = true;
	}

	if(!boolScrollSupported)
		document.getElementById(strScrollField).outerHTML = "";
	else {
		document.getElementById(strScrollField).scrollLeft = 0;
		document.getElementById(strScrollField+"Body").innerHTML = strScrollText;
		document.getElementById(strScrollField).style.display="block";

		if(boolIsNetscape)
		{
			document.getElementById(strScrollField+"Body").style.left = parseInt(intScrollWidth);
			intNSScroll = parseInt(intScrollWidth);
		}
		doScroll(strScrollField, intNSScroll);
	}
}


function doScroll(strScrollField, intNSScroll)
{
	if(boolIsNetscape)
	{
		if(!boolScrollPause)
		{
			document.getElementById(strScrollField+"Body").style.left = intNSScroll;
			intNSScroll = intNSScroll - intScrollSpeed;
			if(intNSScroll < (parseInt(intScrollWidth)*(-1)))
			{
				document.getElementById(strScrollField+"Body").style.right = parseInt(intScrollWidth);
				intNSScroll = parseInt(intScrollWidth);
			}
		}
	else
		if(!boolAllowScrollPause)
		{
			document.getElementById(strScrollField+"Body").style.left = intNSScroll;
			intNSScroll = intNSScroll - intScrollSpeed;
			if(intNSScroll < (parseInt(intScrollWidth)*(-1)))
			{
				document.getElementById(strScrollField+"Body").style.right = parseInt(intScrollWidth);
				intNSScroll = parseInt(intScrollWidth);
			}
		}
	}
	else
	{
		if(!boolScrollPause)
			document.getElementById(strScrollField).scrollLeft += intScrollSpeed;
		else
			if(!boolAllowScrollPause)
				document.getElementById(strScrollField).scrollLeft += intScrollSpeed;
		if(document.getElementById(strScrollField).scrollLeft >= document.getElementById(strScrollField).scrollWidth - document.getElementById(strScrollField).offsetWidth)
			document.getElementById(strScrollField).scrollLeft = 0;
	}
	window.setTimeout("doScroll('"+strScrollField+"','"+intNSScroll+"')", 30);
}

