
var ParaScroller1ScrollingPaneHeightOffset;
var ParaScroller1ScrollingPaneHeight;
var ParaScroller1PauseScroll;
var ParaScroller1MessageCount = 5;
var ParaScroller1ImageLoadDelayMs = 3000;
var ParaScroller1ImageLoadDelayMsCount = 0;
var ParaScroller1ScrollSpeed = 25;


ParaScroller1ImageLoadDelay();

function ParaScroller1Scroll()
{
	if(ParaScroller1PauseScroll==false)
	{
		ParaScroller1ScrollingPaneHeightOffset--;
		if(ParaScroller1ScrollingPaneHeightOffset < ( -1 * ParaScroller1ScrollingPaneHeight))
		{
			ParaScroller1ScrollingPaneHeightOffset=parseInt(document.getElementById('ParaScroller1divScrollWindow').style.height);
		}
		document.getElementById('ParaScroller1divScrollingPane').style.top = ParaScroller1ScrollingPaneHeightOffset + "px";
	}
	setTimeout('ParaScroller1Scroll()',ParaScroller1ScrollSpeed);
}
function ParaScroller1ResetScroll()
{
	document.getElementById('ParaScroller1divScrollingPane').style.width = parseInt(document.getElementById('ParaScroller1divScrollWindow').style.width) - 10 + "px";
	ParaScroller1ScrollingPaneHeight =  0;
	ParaScroller1PauseScroll = false;
	for(i=0; i < ParaScroller1MessageCount; i++)
	{
		ParaScroller1divMessage = document.getElementById('ParaScroller1divMessage' + i);
		
		ParaScroller1divMessage.style.visibility="visible";
		document.getElementById('ParaScroller1divMessageTitle' + i).style.visibility="visible";
		document.getElementById('ParaScroller1divMessageBody' + i).style.visibility="visible";
		
		ParaScroller1divMessage.style.top="" + ParaScroller1ScrollingPaneHeight + "px";
		ParaScroller1ScrollingPaneHeight += ParaScroller1divMessage.offsetHeight + 10;
	}
	document.getElementById('ParaScroller1divScrollingPane').style.height=ParaScroller1ScrollingPaneHeight+"px";
	ParaScroller1ScrollingPaneHeightOffset = parseInt(document.getElementById('ParaScroller1divScrollWindow').style.height);
}

function ParaScroller1MouseClick(index, URL, NewWindow)
{
	if (URL.length > 0)
	{
		if(NewWindow == "True")
		{
			window.open(URL ,"", "");
		}
		else
		{
			//document.location = URL;
			//if(top!= self) top.location.href = self.location.href;
			top.location = URL;
		}
	}
}

function ParaScroller1MouseOver(index, URL)
{
	divMessage = document.getElementById('ParaScroller1divMessage'+index);
	if(URL.length > 0)
	{
		window.status = URL;
		divMessage.style.cursor = 'pointer';
		divMessage.title='Click here for more';	
	}
	else
	{
		divMessage.style.cursor = 'crosshair';
		divMessage.title='Move cursor away to continue scrolling';
	}
	ParaScroller1PauseScroll=true;
}
function ParaScroller1MouseOut(index){
	window.status = "";
	ParaScroller1PauseScroll=false;
}

function ParaScroller1ImageLoadDelay()
{
	if (ParaScroller1ImageLoadDelayMsCount >= ParaScroller1ImageLoadDelayMs)
	{
	ParaScroller1ResetScroll();
	ParaScroller1Scroll();
	}
	else
	{
	ParaScroller1ImageLoadDelayMsCount=ParaScroller1ImageLoadDelayMsCount+250;
	setTimeout("ParaScroller1ImageLoadDelay()",250);
	}
}


