/**********************************************
 * Copyright 2009                             *
 * Property of Sweet LLC.                     *
 *                                            *
 * Use of this script is prohibited without   *
 * written authorization!                     *
 *********************************************/

// Assign these variables to match you html
var TickerID = "Ticker";
var TickerWidth = 150;
var TickerSpeed = 1;
var TickerContent = "Please Donate to the NIAEF Building Fund - A Modern Educational Complex for all Indian Nations.";

// Styles
var TickerFont = "Times New Roman";
var TickerFontSize = "16px";
var TickerFontColor = "#000";
var TickerStyles = "font-style: italic; font-weight: bold;";

// Don't set these variables.
var TickerPaused = false;

function InitializeTicker()
{
    var div = document.getElementById(TickerID);
	var spacer = "<span style=\"height: 50%; width:" + TickerWidth + "px; display: inline-block; \" ></span>";
	// set styles
	div.style.width = TickerWidth + "px";
	div.style.whiteSpace = "nowrap";
	// add spacers and TickerContent
	div.innerHTML = spacer + "<span style=\"cursor:default; height: 100%; display: inline; font-family: " + TickerFont + 
		"; font-size: " + TickerFontSize + "; color: " + TickerFontColor + "; " + TickerStyles + "\" >" + TickerContent + "</span>" + spacer;
	div.scrollLeft = TickerWidth/2;
	setTimeout("DoTick();", 30);
}

function DoTick()
{
    var div = document.getElementById(TickerID);
	if (!TickerPaused)
	{
		if (div.scrollLeft == (div.scrollWidth - div.offsetWidth)) {
			div.scrollLeft = 0;
		}
		else {
			div.scrollLeft += TickerSpeed;
		}
	}
	setTimeout("DoTick();", 30);
}

InitializeTicker();