/****************************************************************************************
'||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
'     *##  *##
'     ##   ##             Copyright 2007 H & B Solutions
'    ##***##              All Rights Reserved
'   ##   ##               
' *##  *#&##**%           Authors: Hernandez, Bailey
'        ##   ##          Date:    Feb 2007
'       ##***%            Version: 0.01
'      ##    ##  
'    *##****^  Solutions
'||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
*****************************************************************************************/

/****************************************************
This variables will set the delay and amount of news.
*****************************************************/
var ArrInd;
var TimeDelay;
var strInternal;
var spanCurrent;
var spanTotal;
spanCurrent = "";
spanTotal = "";
ArrInd = 0;
TimeDelay = 8000; //*** In Milliseconds 1000 = 1 second.****
//****************************************************

/****************************************************************************************
Use this array to add your news. Do not use Double quotes " in the text.
Have no more than 3 lines. Use all HTML tags available. Use <BR> for Carriage Return. 
To create new items use the following template:
content[N] = ""
Where N is the next number in the list. Your information goes inside the double quotes.
*****************************************************************************************/
var content=new Array()
content[0] = "The JULY menu is available. Also check out the North Greece Kids E-Wall!"
content[1] = "<b><font color=red>NEW!!!</font></b> Care-a-lot family members, check out our <b><a href=./familycenter.asp>Family Links</a></b> page for the monthly menu and your very own Kids E-Wall (images coming soon)."
content[2] = "Come explore our centers online by stepping through our <b><a href=./virtualtour.asp>Virtual Tour</a></b>."
content[3] = "Limited openings are still available at some of our centers. <b><a href=./contact.asp>Contact</a></b> us for more information."
content[4] = "Seeking employment at Care-a-lot? Please visit our <b><a href=./employment.asp>employment</a></b> page."
content[5] = "Check this section often to get the latest in Care-a-lot news."

//

//content[0] = "<b><u>OPEN HOUSE!!!</u></b> <font color=red>Saturday September 12th</font>, 11AM - 3PM at our <u>Farmington / Canandaigua</u> location. There will be <b>free hot dogs</u> and a <b><u>Bounce House</u></b>. <b>SAVE THE DATE!!!</b>"
// content[1] = "All centers are open for the summer and accepting children of all ages. Call now to provide your children with the summer care you feel good about.<BR><BR>"
// <b><u>Farmington / Canandaigua area</u></b>: Care-a-lot invites you to visit its latest center on Rochester Road (Rte. 332)! We look forward to caring for your family.<BR><BR>
//content[0] = "<b><u><font color=red>Zoo Night IS HERE!</font></u></b> The Care-a-lot family gathers once again for <u>Care-a-lot Night</u> at the Seneca Park Zoo. The event is Thursday June 25, from 6 - 8 PM. Please pick up your free family ticket at any center front desk."
//content[1] = "We are honored that 96% of surveyed Care-a-lot parents are Very Pleased and Delighted with the quality of care. We will use your suggestions as we strive for 100% satisfaction."
//content[0] = "<b><u>Farmington / Canandaigua area</u></b>: Care-a-lot proudly announces the opening of its latest center on Rochester Road! Come see us <b><a href=./virtualtour.asp>online</a></b> or better yet come on in for a visit! We look forward to caring for your family."
//content[0] = "All centers are open for the summer and accepting children of all ages."
//content[2] = "Zoo Night: Care-a-lot families and their friends are invited to Care-a-lot night at the Seneca Park Zoo. The event is Wed., 6/20, from 6 - 8 PM. Please pick up your free family ticket at any center front desk."
//content[3] = "Look for "
//****************************************************

/********************************************************
Initialize strInternal and kicks off the News ticker.
*********************************************************/
function StartNews(strObj, strCurrent, strTotal){
	strInternal = strObj;
	spanCurrent = strCurrent;
	spanTotal = strTotal;
	writeSpan();
}//End Start News


/********************************************************
Writes the news information to the News span object in the page.
*********************************************************/
function writeSpan(){
	//************* Write the Amount of news where available ********
	if ( (spanCurrent != "") && (spanTotal != "") ){
		document.getElementById(spanCurrent).innerHTML = ArrInd + 1;
		document.getElementById(spanTotal).innerHTML = content.length;
	}
	//****************************************************************

	//*************Write the information to the Span Object and increment the Array seed*************
	document.getElementById(strInternal).innerHTML = "" + content[ArrInd];
	ArrInd++;
	//************************************************************************************************

	//*************Reset the Array Seed*************
	if (ArrInd == content.length)
		ArrInd = 0;
	//**********************************************
	
	//*************Show the News for N seconds*************
	setTimeout('writeSpan()',TimeDelay);
	//*****************************************************	
}//Write Span Ends


/********************************************************
Pause the execuiton of any script by N milliseconds
*********************************************************/
function pausecomp(millis)
{
	var date = new Date();
	var curDate = null;

	do { curDate = new Date(); }
	while(curDate-date < millis);
}//Pause ends