flag = 0
colorCnt=15;
newsCnt=0;
counter=0;

var news = new Array()
var colors = new Array()
	
	colors[0] = "#000000"
	colors[1] = "#111111"
	colors[2] = "#222222"
	colors[3] = "#333333"
	colors[4] = "#444444"
	colors[5] = "#555555"
	colors[6] = "#666666"
	colors[7] = "#777777"
	colors[8] = "#888888"
	colors[9] = "#999999"
	colors[10] = "#AAAAAA"
	colors[11] = "#BBBBBB"
	colors[12] = "#CCCCCC"
	colors[13] = "#DDDDDD"
	colors[14] = "#EEEEEE"
	colors[15] = "#FFFFFF"

news[0] = "The main temple is divided into four parts."
news[1] = "The most important of these temples is the Bimala devi temple."
news[2] = "It is said that worship of Lord Jagannath is complete only after worshipping Bimala devi."
news[3] = "Bimala Devi gets the prasad Offerings Lord Jagannath and then it becomes Mahaprasadam."
news[4] = "The Mukhasala houses the jewelery, clothes, other paraphernalia and the bedroom for Lord Jagannath."
news[5] = "Also this is a place where the Gita-govinda of Poet &amp; devotee Jayadeva is sung and danced to by the Devadasis."
news[6] = "There are four Gates" 
news[7] = "The Eastern Simhadvara, the southern Aswadvara, the western Vyagradvara and the northern Hastidvara."
news[8] = "The Simhadvara (Lion Gate) is the main entrance on Grand Road."
news[9] = "The temple priests saved the deities from the invaders and preserved them secludedly."

function displayNews()
{
if(newsCnt==news.length)
{
	newsCnt=0;
}
preNewsNo.innerHTML=newsCnt+1
totNewsNo.innerHTML = news.length;
	if(counter<=60 && flag==0)
	{
		newsContent.innerHTML = news[newsCnt];
		if(colorCnt>=0)
		{
			newsContent.style.color = colors[colorCnt];
			colorCnt--;
		}
		counter++;
	}
	else
	{
		flag=1
		if(flag==1)
		{
			colorCnt++;

			newsContent.innerHTML = news[newsCnt];
			newsContent.style.color = colors[colorCnt];

			if(colorCnt==16)
			{
				flag=0;
				counter=0;
				newsCnt++;
			}
		}
	
	}

}

function runNews()
{
	timer = window.setInterval("displayNews()",100)
}
function stopNews()
{
	window.clearTimeout(timer);
}
function loadPage()
{
url="jphistory.asp";
window.open(url);
}


