/* Tickler.js
This is the file that provides seasonal messages to several screens based on message date.
Revised 1/22/98 to allow multiple events on the same day.  Revised test for multiple 11/11/99.*/
<!--
function print() {
	 document.write("Big Date: " + this.bdate
	  + "<br>gt1a: " + this.gt1a
	  + "<br>gt1b: " + this.gt1b
	  + "<br>eve: " + this.eve
	  + "<br>eqday: " + this.eqday + "<p>");
	}

function printa() {
	var message="<P align=center><font color=brown size=5>"+else_msg
	if (daysLeft >1){ message= "<p align=center><B>"+this.gt1a+daysLeft+this.gt1b+" on " +showdate(this.bdate) +"</B>"}
	if (daysLeft==1){message = "<p align=center>"+this.eve+"</B>"}
	if (daysLeft==0){message = "<p align=center>"+this.eqday+"</B>"}
	document.write(message);
	}

function printb() {
	var message="<P align=center><font color=brown size=5>"+else_msg
	if (daysLeftNext >1){ message= "<B>"+this.gt1a+daysLeftNext+this.gt1b+" on " +showdate(this.bdate) +"</B>"}
	if (daysLeftNext==1){message = this.eve+ " on " +  showdate(this.bdate) +"</B>"}
	if (daysLeftNext==0){message = this.eqday+"</B>"}
	document.write(message);
	}

function event(bdate,gt1a,gt1b,eve,eqday) { 
	this.bdate = new Date(bdate);
 	this.gt1a = gt1a;
 	this.gt1b = gt1b;
	this.eve = eve;
	this.eqday = eqday;
 	this.print = print;
	this.printa = printa;
	this.printb = printb;
	}

function showdate(mydate) {
	thedate = mydate.getMonth()+1;
	thedate = thedate + "/" + mydate.getDate()+"/"+mydate.getFullYear();
	return thedate;
	}


//Construct a date variable for 0000 hours today
		var now= new Date();		// Current date & time
		var year = now.getYear()
		if(year < 1900)
		{
			year = year + 1900;
		}
		var month = now.getMonth()
		var day = now.getDate()
		var today= new Date(year,month,day)

// set dotest to 1 to substitute the testdate for today. set to 0 for normal operation
var testdate=new Date("9/25/2003");
var dotest= 0;
if(dotest==1){today = testdate;}

// Event data entry starts below
//Do not overwrite last event.  It is my stopper.
// If you add rather than change events, adjust the num_events value below
//Recommend that first ten event numbers be reserved for one-shot events
//Recommend that Events 10 thru -? be repeating yearly events

var num_events = 50;

// Go for it
//insert below here
var library = new Object();
library[0] = new event(
	"12/2/2006",
	"You have ",
	" days until the Dec 2nd & 3rd Florida Round Dance Council Phase IV-V Clinic Weekend - Stardust Dance Center - Plant City, Florida",
	"Tomorrow is the Dec 2nd & 3rd Florida Round Dance Council Phase IV-V Clinic Weekend - Stardust Dance Center - Plant City, Florida",
	"Today is the first day of the Dec 2nd & 3rd Florida Round Dance Council Phase IV-V Clinic Weekend - Stardust Dance Center - Plant City, Florida"
	);
library[1] = new event(
	"6/29/2007",
	"You have ",
	" days until 4th July W/E - Plus Level w/Red Bates - Rocky's Recreation Area - Boonville, New York (June 29 - July 2)",
	"Tomorrow is 4th July Weekend (June 29 - July 2). Plus level with Red Bates<br>Rocky's Recreation Area, Boonesville, New York.",
	"4th July Weekend (June 29 - July 2). Plus level with Red Bates<br>Rocky's Recreation Area, Boonesville, New York starts today"
	);
library[2] = new event(
	"10/19/2007",
	"You have ",
	" days until the Red River Rounders Halloween Ball - Phase IV-V-VI - Civic Center - Shreveport/Bossier City, Louisiana",
	"Tomorrow is the first day of the Red River Rounders Halloween Ball - Phase IV-V-VI - Civic Center - Bossier City, Louisiana",
	"Today is the first day of the Red River Rounders Halloween Ball - Phase IV-V-VI - Civic Center - Bossier City, Louisiana"
	);
library[3] = new event(
	"4/25/2008",
	"You have ",
	" days until the Texas Cotillion - (April 25-27) - Phase IV-V-VI <br> Dance Federation Building - Lubbock, Texas starting ",
	"Tomorrow is the start of the Texas Cotillion ",
	"Today you should be in Lubbock Texas for the start of the Texas Cotillion"
	);
library[4] = new event(
	"09/25/2008",
	"You have ",
	" days until the Myrtle Beach Ball - Phase II-III-IV-V - Ocean Dunes - Myrtle Beach, South Carolina ",
	"Myrtle Beach Ball - Phase II-III-IV-V - Ocean Dunes - Myrtle Beach, South Carolina starts tomorrow.",
	"Myrtle Beach Ball - Phase II-III-IV-V - Ocean Dunes - Myrtle Beach, South Carolina starts today."
	);
library[5] = new event(
	"1/9/2009",
	"A 'Black Tie' Affair  -  Phase IV - VI - Tower Point Resort - Mesa, Arizona starts in ",
	" days.   ",
	"A 'Black Tie' Affair  -  Phase IV - VI - Tower Point Resort - Mesa, Arizona starts tomorrow night.",
	"A 'Black Tie' Affair  -  Phase IV - VI - Tower Point Resort - Mesa, Arizona starts tonight."
	);
library[6] = new event(
	"1/17/2009",
	"You have ",
      " days until the Fabulous Four Weekend - Phase IV-VI - w/Moore & Read - Stardust Dance Center - Plant City, FL",
	"Tomorrow is the first day of the Fabulous Four Weekend - Phase IV-VI - w/Moore & Read - Stardust Dance Center - Plant City, FL",
	"Today is the first day of the Fabulous Four Weekend - Phase IV-VI - w/Moore & Read - Stardust Dance Center - Plant City, FL"
	);
library[7] = new event(
	"6/5/2009",
	"You have ",
	" days until the Western Ontario W/E - Phase III-V - John Paul Secondary School - London, Ontario Canada",
	"Tomorrow is the first day of the Western Ontario W/E - Phase III-V - John Paul Secondary School - London, Ontario Canada",
	"Today is the first day of the Western Ontario W/E - Phase III-V - John Paul Secondary School - London, Ontario Canada"
	);

library[8] = new event( 
	"6/22/2009",
	"You have ",
	" days until the European Teachers Association 50th Anniversary - Clinics - June 22-28 Conference Center - Suhl, Germany",
	"Tomorrow is the first day of the European Teachers Association 50th Anniversary - Clinics - Conference Center - Suhl, Germany",
	"Today is the first day of the European Teachers Association 50th Anniversary - Clinics - Conference Center - Suhl, Germany"
	);
library[9] = new event(
	"7/4/2009",
	"European Round Dance Week - Phase V-VI - July 4-11 - Bodabaden Resort - Oland, Sweden starts in",
	" days",
	"European Round Dance Week - Phase V-VI - July 4-11 - Bodabaden Resort - Oland, Sweden starts tomorrow.",
	"European Round Dance Week - Phase V-VI - July 4-11 - Bodabaden Resort - Oland, Sweden starts today."
	);
library[10] = new event(
	"2/5/2010",
	"Cactus Capers - Phase IV-V VI  - Feb 5,6,7 - Leisure World Recreation Hall - Mesa, Arizona starts in ",
	" days",
	"The Weekend of Rounds starts tomorrow.",
	"The Weekend of Rounds starts today."
	);
library[11] = new event(
	"3/26/2010",
	"You have ",
	" days until the 53rd KRDA Spring Festival - Phase IV-V-VI - Municipal Building - Junction City, Kansas",
	"Tomorrow is the 53rd KRDA Spring Festival - Phase IV-V-VI - Municipal Building - Junction City, Kansas",
	"Today is the 53rd KRDA Spring Festival - Phase IV-V-VI - Municipal Building - Junction City, Kansas"
	);
library[12] = new event(
	"4/4/2010",
	"You have ",
	" days until the European week of Rounds (April 4-9) Hotel Ramdsberger Hof -  Cham, Germany.<br>Phase III-IV-V-IV. Dance starts ",
	"The European week of Rounds starts tomorrow.</A>",
	" The European week of Rounds starts today."
	);
library[13] = new event(
	"5/1/2010",
	"You have ",
	" days to Springfest (5/1 - 5/2) - Phase IV-V-VI.<br>Cypress Senior Center- Cypress, California",
	"Springfest (5/1 - 5/2) - Phase IV-V-VI.<br>Cypress Senior Center- Cypress, California starts tomorrow.",
	"Springfest (5/1 - 5/2) - Phase IV-V-VI.<br>Cypress Senior Center- Cypress, California starts today."
	);
library[14] = new event(
	"6/4/2010",
	"You have ",
	" days until the Round-Up W/E -  Phase V-VI w/Shibata<br>Green Palace Hotel - Kinugawa, Japan",
	"Tomorrow is the Round-Up W/E -  Phase V-VI w/Shibata<br>Green Palace Hotel - Kinugawa, Japan ",
	"Today is the Round-Up W/E -  Phase V-VI w/Shibata<br>Green Palace Hotel - Kinugawa, Japan "
	);
library[15] = new event(
	"7/23/2010",
	"15th Annual NCRDA W/E - Phase III-VI - Old School Gym - West End, North Carolina  starts in  ",
	" days .",
	"15th Annual NCRDA W/E - Phase III-VI - Old School Gym - West End, North Carolina  starts tomorrow.",
	"15th Annual NCRDA W/E - Phase III-VI - Old School Gym - West End, North Carolina  starts tonight."
	);
library[16] = new event(
	"8/27/2010",
	"You have ",
	" days until the Waltz Boot Camp - Phase III-IV - Aug 27-29 - Clairvaux Mckillop Hall - Mt. Gravatt, Australia  ",
	"The Waltz Boot Camp - Phase III-IV - Clairvaux Mckillop Hall - Mt. Gravatt, Australia starts tomorrow.",
	"The Waltz Boot Camp - Phase III-IV - Clairvaux Mckillop Hall - Mt. Gravatt, Australia starts today."
	);
library[17] = new event(
	"9/3/2010",
	"The Labor Day Dance Weekend - Phase IV-V - SeptClairvaux Mckillop Hall - Mt. Gravatt, Australia starts in ",
	" days ",
	"The Labor Day Dance Weekend - Phase IV-V - Clairvaux Mckillop Hall - Mt. Gravatt, Australia  starts tomorrow.",
	" The Labor Day Dance Weekend - Phase IV-V - Clairvaux Mckillop Hall - Mt. Gravatt, Australia  starts today."
	);
library[18] = new event(
	"9/10/2010",
	"You have ",
	" days until the State Round Dance Festival - Phase IV-V-VI - Dance Center - Albuquerque, New Mexico.  Official Dance starts ",
	"The State Round Dance Festival - Phase IV-V-VI - Dance Center - Albuquerque, New Mexico starts tomorrow.",
	"Today is the start of the State Round Dance Festival - Phase IV-V-VI - Dance Center - Albuquerque, New Mexico"
	);
library[19] = new event(
	"9/10/2010",
	"Extravaganza of Rounds - Phase IV-VI - Red River Community House - Red River, New Mexico starts in ",
	"  days ",
	"Extravaganza of Rounds - Phase IV-VI - Red River Community House - Red River, New Mexico starts tomorrow.",
	"Extravaganza of Rounds - Phase IV-VI - Red River Community House - Red River, New Mexico starts today."
	);
library[20] = new event(
	"10/1/2010",
	"You have ",
	" days until the Show Me Festival - Phase IV-V-VI - Capital Ritz Ballroom - Jefferson City, Missouri .",
	"The Show Me Festival - Phase IV-V-VI - Capital Ritz Ballroom - Jefferson City, Missouri  starts tomorrow.",
	" The Show Me Festival - Phase IV-V-VI - Capital Ritz Ballroom - Jefferson City, Missouri  starts today."
	);
library[21] = new event(
	"10/16/2010",
	"FRDC Fall W/E - Phase III-IV-V - Stardust Dance Center - Plant City, Florida  starts in ",
	" days.",
	"FRDC Fall W/E - Phase III-IV-V - Stardust Dance Center - Plant City, Florida  starts tomorrow.",
	"FRDC Fall W/E - Phase III-IV-V - Stardust Dance Center - Plant City, Florida  starts today."
	);
library[22] = new event(
	"12/11/2010",
	"You have ",
	" days until the Christmas Party & Super Saturday - Phase IV-V-VI - Stardust Dance Center - Plant City, Florida",
	"Tomorrow is the Christmas Party & Super Saturday - Phase IV-V-VI - Stardust Dance Center - Plant City, Florida",
	"Today is the Christmas Party & Super Saturday - Phase IV-V-VI - Stardust Dance Center - Plant City, Florida"
	);
library[23] = new event(
	"2/4/2011",
	"You have ",
	" days until Houston Festival - Phase IV-V-VI - Knights of Columbus Lodge #2917 - Houston, Texas ",
	"Tomorrow is the Houston Festival - Phase IV-V-VI - Knights of Columbus Lodge #2917 - Houston, Texas  ",
	"Today is the first day of the Houston Festival - Phase IV-V-VI - Knights of Columbus Lodge #2917 - Houston, Texas "
	);
library[24] = new event(
	"3/12/2011",
	"You have ",
	" days until the Colossal Week of Rounds (March 12 - 17) with Goss and Worlock at Stardust Dance Center - Plant City, Florida",
	"Tomorrow is the Colossal Week of Rounds at Stardust Dance Center - Plant City, Florida with Goss and Worlock",
	"Colossal Week of Rounds at Stardust Dance Center - Plant City, Florida with Goss and Worlock starts today. "
	);
library[25] = new event(
	"3/25/2011",
	"You have ",
	" days until Star Fest (3/25-3/27)- Phase IV-VI - View Point RV & Golf Resort -  Mesa, Az",
	"Star Fest starts tomorrow.",
	"Star Fest today."
	);
library[26] = new event(
	"4/2/2011",
	"You have ",
     " days until Super Saturday - Phase V-VI - Stardust Dance Center - Plant City, Florida",
	"Tomorrow is Super Saturday - Phase V-VI - Stardust Dance Center - Plant City, Florida",
	"Today is Super Saturday - Phase V-VI - Stardust Dance Center - Plant City, Florida"
	);
library[27] = new event(
	"4/15/2011",
	"You have ",
	" days until Spring Roundarama - phase V-VI with Rumble - Cherry Hill Park, College Park Maryland",
	"Spring Roundarama - phase V-VI with Rumble - Cherry Hill Park, College Park Maryland starts tomorrow.",
	"Spring Roundarama - phase V-VI with Rumble - Cherry Hill Park, College Park Maryland starts today."
	);
library[28] = new event(
	"5/12/2011",
	"You have ",
	" days until the 50th T&D Festival - Phase II-V - Brock University - St. Catharines, Ontario Canada ",
	"Tomorrow is the 50th T&D Festival - Phase II-V - Brock University - St. Catharines, Ontario Canada ",
	"Today is the 50th T&D Festival - Phase II-V - Brock University - St. Catharines, Ontario Canada "
	);
library[29] = new event(
	"5/22/2011",
	"You have ",
	" days until Spring Week of Rounds - Phase III-VI  Fontana Village, North Carolina ",
	"Tomorrow is the first day of the Spring Week of Rounds - Phase III-VI Fontana Village, North Carolina",
	"Today is the first day of the Spring Week of Rounds - Phase III-VI Fontana Village, North Carolina"
	);
library[30] = new event(
	"6/17/2011",
	"Cherry Ridge W/E - Phase V-VI - Cherry Ridge Campgrounds - Honesdale, Pennsylvania (June 17-19) starts in ",
	" days.",
	"Cherry Ridge Weekend starts tomorrow. ",
	"Cherry Ridge Weekend starts today."
	);
library[31] = new event(
	"7/16/2011",
	"You have ",
	" days until the Pre-ICBDA W/E - Phase V-VI w/Shibata - Stardust Dance Center - Plant City, Florida ",
	"Tomorrow is the Pre-ICBDA W/E - Phase V-VI w/Shibata - Stardust Dance Center - Plant City, Florida ",
	"The Pre-ICBDA W/E - Phase V-VI w/Shibata - Stardust Dance Center - Plant City, Florida starts today"
	);
library[32] = new event(
	"7/20/2011",
	"You have ",
	" days to the 35th ICBDA Convention - Phase III-VI - Lakeland Center - Lakeland, Florida  ",
	"The 35th ICBDA Convention - Phase III-VI - Lakeland Center - Lakeland, Florida  starts tomorrow",
	"The 35th ICBDA Convention - Phase III-VI - Lakeland Center - Lakeland, Florida starts today"
	);
library[33] = new event(
	"8/6/2011",
	"You have ",
	" days until the start of the Roundarama Institute - Phase IV-V-VI - August 6-11 - Purdue University - W. Lafayette, Indiana ",
	"The Roundarama Institute - Phase IV-V-VI - Purdue University - W. Lafayette, Indiana starts tomorrow.",
	"The Roundarama Institute - Phase IV-V-VI - Purdue University - W. Lafayette, Indiana starts today. "
	);
library[34] = new event(
	"9/9/2011",
	"You have ",
     " days until Southern Japan Anniversary Party - Phase IV-V-VI - Hiroshima Center - Hiroshima, Japan",
	"Tomorrow is Southern Japan Anniversary Party - Phase IV-V-VI - Hiroshima Center - Hiroshima, Japan",
	"Today is Southern Japan Anniversary Party - Phase IV-V-VI - Hiroshima Center - Hiroshima, Japan"
	);
library[35] = new event(
	"9/23/2011",
	"Palmquist Roundup - Phase IV-V-VI  - The Pavillion - Palm Springs California  (Sep 23-17) starts in ",
	" days",
	"Palmquist Roundup - Phase IV-V-VI  - The Pavillion - Palm Springs California  (Sep 23-17) starts tomorrow.",
	"Palmquist Roundup - Phase IV-V-VI  - The Pavillion - Palm Springs California  (Sep 23-17) starts today."
	);
library[36] = new event(
	"10/15/2011",
	"Florida Round Dance Council - Phase III-IV-V -Stardust Dance Center - Plant City Florida  - starts in ",
	" days. ",
	"Florida Round Dance Council - Phase III-IV-V -Stardust Dance Center - Plant City Florida starts tomorrow .",
	"Florida Round Dance Council - Phase III-IV-V -Stardust Dance Center - Plant City Florida starts today."
	);
library[37] = new event(
	"10/21/2011",
	"Autumn Spectacular - Phase IV-V-VI - Heritage Elementary School - Woodburn, Oregon starts in ",
	" days.",
	"Tomorrow is the Autumn Spectacular - Phase IV-V-VI - Heritage Elementary School - Woodburn, Oregon",
	"Autumn Spectacular - Phase IV-V-VI - Heritage Elementary School - Woodburn, Oregon starts today. "
	);
library[38] = new event(
	"10/28/2011",
	"You have ",
	" days until the Cuers Association (10/28 - 10/30) - Phase III-IV-V  - Winston Heights Comm. Center - Calgary, Alberta Canada",
	"Tomorrow is  the start of the Cuers Association (10/28 - 10/30) - Phase III-IV-V  - Winston Heights Comm. Center - Calgary, Alberta Canada",
	"Today is the start of the Cuers Association (10/28 - 10/30) - Phase III-IV-V  - Winston Heights Comm. Center - Calgary, Alberta Canada"
	);
library[39] = new event(
	"11/04/2011",
	"Autumn Fest - Phase IV-VI - ViewPoint RV & Golf Resort - Mesa, Az starts in  ",
	" days",
	"Autumn Fest  - Mesa, Az starts tomorrow.",
	"Autumn Fest  - Mesa, Az starts tonight."
	);
library[40] = new event(
	"11/19/2011",
	"You have ",
     " days until Super Saturday - Phase V-VI - Stardust Dance Center - Plant City, Florida",
	"Tomorrow is Super Saturday - Phase V-VI - Stardust Dance Center - Plant City, Florida",
	"Today is Super Saturday - Phase V-VI - Stardust Dance Center - Plant City, Florida"
	);
library[41] = new event(
	"11/25/2011",
	"You have ",
	" days until the Harvest Holiday Festival (11/25 - 11/27) - Phase IV-V-VI<br>Sterling Hotel - Dallas, Texas.",
	"The Harvest Holiday Festival (11/25 - 11/27)  - Dallas, Texas - starts tomorrow.",
	"The Harvest Holiday Festival (11/25 - 11/27)  - Dallas, Texas - starts today "
	);
library[42] = new event(
	"12/9/2011",
	"Mavericks & Angels - Phase IV-V-VI - Veterans Memorial Hall - Roseville, California (Dec 9-11) starts in  ",
	" days",
	"Mavericks & Angels - Phase IV-V-VI - Veterans Memorial Hall - Roseville, California (Dec 9-11) starts tomorrow.</A>",
	"Mavericks & Angels - Phase IV-V-VI - Veterans Memorial Hall - Roseville, California (Dec 9-11) starts today."
	);
library[43] = new event(
	"12/17/2011",
	"You have ",
	" days until Super Saturday - Phase V-VI - Stardust Dance Center - Plant City, Florida.",
	"Tomorrow is Super Saturday in Plant City",
	"Today is Super Saturday in Plant City"
	);
library[44] = new event(
	"12/31/2011",
	"You have ",
	" days until the New Year's W/E w/Hurd (12/31 - 1/2/2012) - Phase IV-VI - Stardust Dance Center - Plant City, Florida",
	"Tomorrow is the first day of the New Year's W/E w/Hurd - Phase IV-VI - Stardust Dance Center - Plant City, Florida",
	"Today is the first day of the New Year's W/E w/Hurd - Phase IV-VI - Stardust Dance Center - Plant City, Florida"
	);
library[45] = new event(
	"1/14/2012",
	"You have ",
	" days until Boot Camp - Jan 14-18 - focus is Phase IV-V Quickstep- Stardust Dance Center - Plant City Florida",
	"Boot Camp - Jan 14-18 - focus is Phase IV-V Quickstep- Stardust Dance Center - Plant City Florida starts tomorrow",
	"Boot Camp - Jan 14-18 - focus is Phase IV-V Quickstep - Stardust Dance Center - Plant City Florida starts today"
	);
library[46] = new event(
	"1/21/2012",
	"Super Saturday - Phase V-VI  - Stardust Dance Center - Plant City, Florida in  ",
	 "days",
	"Super Saturday, Stardust Dance Center - Plant City, Florida tomorrow night",
	"Super Saturday Stardust Dance Center - Plant City, Florida tonight."
	);
library[47] = new event(
	"2/11/2012",
	"You have ",
	" days until Boot Camp - focus phase IV, V Waltz -Stardust Dance Center - Plant City, Florida.",
	"Tomorrow is the start of Fall Boot Camp - focus phase IV, V Waltz -Stardust Dance Center - Plant City, Florida.",
	"Boot Camp starts today- focus phase IV, V Waltz -Stardust Dance Center - Plant City, Florida."
	);
library[48] = new event(
	"2/18/2012",
	"Super Saturday - Phase V-VI  - Stardust Dance Center - Plant City, Florida in  ",
	 "days",
	"Super Saturday, Stardust Dance Center - Plant City, Florida tomorrow night",
	"Super Saturday Stardust Dance Center - Plant City, Florida tonight."
	);
library[49] = new event(
	"2/25/2012",
	"The Carolina Jubilee of Rounds - (Phase IV-V-VI @ The Barn in West Columbia, SC) starts in  ",
	" days ",
	"The Carolina Jubilee of Rounds starts tomorrow.",
	"The Carolina Jubilee of Rounds starts today."
	);
library[99] = new event(
	"1/1/2013",
	"You have run out of events in your list.  By the way, there are ",
	" days until the year 2013.",
	"Its New Years Eve",
	"Happy New Year"
	);

//Insert above here
library.length = 6;

varholder = 99
for (var eventNum = 0; eventNum <num_events; ++eventNum) {
	if(varholder==99 && library[eventNum].bdate.getTime() - today.getTime() >= 0){
		varholder=eventNum;}
	if(varholder < 99 && library[eventNum].bdate - library[varholder].bdate < 0 && 		library[eventNum].bdate.getTime() - today.getTime() >= 0){
		varholder=eventNum;}
//	document.write(eventNum +", " + varholder +"<br>");
	}

varholdernext = 99
for (var eventNum = 0; eventNum <num_events; ++eventNum) {
	if(varholdernext==99 && library[eventNum].bdate.getTime() - library[varholder].bdate.getTime() >= 0.5){
		varholdernext=eventNum;}
	if(varholdernext < 99 && library[eventNum].bdate - library[varholder].bdate > 0.5 && 		library[varholdernext].bdate.getTime() - library[eventNum].bdate.getTime() > 0.5){
		varholdernext=eventNum;}
//	document.write(eventNum +", " + varholdernext +", " + varholder + "<br>");
	}


var else_msg="Uhhh...something!"
for (var eventNum = 0; eventNum <num_events; ++eventNum) {

	// equality test below did not work for unknown reasons. Switched to abs( delta ) test.
	// if(library[eventNum].bdate == library[varholder].bdate) {

	if(Math.abs(library[varholder].bdate - library[eventNum].bdate)<2) {
		//Create constant to represent the number of milliseconds per day
		msPerDay = 24 * 60 * 60 * 1000 ; 

		//Subtract today from targetdate
		//Difference will be in milliseconds so we divide by milliseconds per day 
		daysLeft = Math.round((library[varholder].bdate.getTime() - today.getTime()) / msPerDay);
		//daysLeftNext = Math.round((library[varholdernext].bdate.getTime() - today.getTime()) / msPerDay);
		//document.write(eventNum);
		library[eventNum].printa();
	}
}
document.write("<hr>");
for (var eventNum = 0; eventNum <num_events; ++eventNum) {

	if(Math.abs(library[varholdernext].bdate - library[eventNum].bdate)<2) {
		//Create constant to represent the number of milliseconds per day
		msPerDay = 24 * 60 * 60 * 1000 ; 

		//Subtract today from targetdate
		//Difference will be in milliseconds so we divide by milliseconds per day 
		daysLeftNext = Math.round((library[varholdernext].bdate.getTime() - today.getTime()) / msPerDay);
		library[eventNum].printb();
	}
}
//document.write("<hr>");

// -->


