var tickerContainer;var tickerItems;var currentItem = 0;var tickerWidth;var tickerHeight;var animationTimeout;var tickerInterval;function setupTicker(){	// locate the ticker container	tickerContainer = null;	if (document.all)		tickerContainer = document.all.TickerContainer;	else		tickerContainer = document.getElementById('TickerContainer');		if (tickerContainer != null)	{		// now determine the width of the container		if (tickerContainer.clientWidth > 0)			tickerWidth = tickerContainer.clientWidth;		else			tickerWidth = tickerContainer.offsetWidth;		tickerHeight = 0;				// now process through the div elements within the ticker and determine the tallest one		tickerItems = tickerContainer.getElementsByTagName('div');		for (index = 0; index < tickerItems.length; index++)		{			// determine the height for this item and see if it's the largest we've seen so far			if (tickerItems[index].clientHeight > 0)				itemHeight = tickerItems[index].clientHeight;			else				itemHeight = tickerItems[index].offsetHeight;						if (itemHeight > tickerHeight)				tickerHeight = itemHeight;		}				// now specify the height of our container and each item to be the largest height		tickerContainer.style.height = tickerHeight + 'px';		tickerContainer.style.overflow = 'hidden';		for (index = 0; index < tickerItems.length; index++)		{			tickerItems[index].style.height = tickerHeight + 'px';			tickerItems[index].style.width = tickerWidth + 'px';			tickerItems[index].style.overflow = 'hidden';		}				// now that everyone is the same height, we can easily jump from one to the next		// start the ticker		tickerInterval = setInterval('showNextTickerItem();', 4500);	}}function showNextTickerItem(){	// determine the next ticker item	currentItem = (currentItem + 1) % tickerItems.length;		// clear any existing animations	clearTimeout(animationTimeout);		// scroll to the position of this item in the container	animateScrollFromTo(currentItem * tickerHeight);}function animateScrollFromTo(finalPosition){	// move 1 more pixel	var currentPosition = tickerContainer.scrollTop;	var scrollPosition = currentPosition + 1;		// set the new scroll position	if (scrollPosition < finalPosition)	{		tickerContainer.scrollTop = scrollPosition;		animationTimeout = setTimeout('animateScrollFromTo(' + finalPosition + ');', 5);	}	else	{		tickerContainer.scrollTop = finalPosition;	}}if (window.addEventListener){	window.addEventListener('load', setupTicker, false);}else if (window.attachEvent){	window.attachEvent('onload', setupTicker);}