/* This set of scripts is used within the Endicott Web site to provide on-the-fly information in ference to dates and monthly events */























/* Function GetEvent(val)





This simple function references the array 'day' and returns the information requested in the variable 'val'.





So if 'val' was equal to 21, the value listed under day[21] would be returned. This function is where the calender





of events is listed digitally and should be updated the last day of every month. You should clear out all the entrys





from each day and then input the new data for the month. It is essential that if there is no data for a particular day





that the day is equal to "", which is nothing in computer langauge. Again that is essential. Second, the first entry of





day[0] should always be equal the number of days in the current month. So if there are 30 days in the current month





then day[0] ="30". Simple. */





function GetEvent(val) {







	var day = new Array







       day[0] = "28"







	day[1] = "Listening Post"







    day[2] = "Listening Post"







	day[3] = "Flick and Food"







	day[4] = "Listening Post, SJSPIRIT MEETING"







	day[5] = ""





	day[6] = ""







	day[7] = ""







	day[8] = "The Listening Post"






	day[9] = "Listening Post"







	day[10] = ""







	day[11] = "The Listening Post, SJSPIRIT Meeting"






       day[12] = ""






	day[13] = ""






	day[14] = ""







	day[15] = "Listening Post"






	day[16] = "The Listening Post"







	day[17] = "Ash Wednesday"







	day[18] = "Listening Post, SJSPIRIT meeting"







	day[19] = ""







	day[20] = ""






       day[21] = "Sex and the Bible"






       day[22] = "Listening Post"








	day[23] = "Listening Post"






       day[24] = ""







	day[25] = "Listening Post"







	day[26] = ""








	day[27] = ""







	day[28] = ""







	day[29] = "SJSPIRIT ACTIVITY NIGHT"








	day[30] = ""







	day[31] = ""







	return day[val]







	}

















function GetDay(intDay){







     var DayArray = new Array("Sunday", "Monday", "Tuesday", "Wednesday", 











                          "Thursday", "Friday", "Saturday")











     return DayArray[intDay]











     }























   function GetMonth(intMonth){











     var MonthArray = new Array("January", "February", "March",











                                "April", "May", "June",











                                "July", "August", "September",











                                "October", "November", "December") 











     return MonthArray[intMonth]                  











     }











   function getDateStrWithDOW(){











     var today = new Date()











     var year = today.getYear()











     if(year<1000) year+=1900











     var todayStr = GetDay(today.getDay()) + ", "











     todayStr += GetMonth(today.getMonth()) + " " + today.getDate()











     todayStr += ", " + year











     return todayStr











     }











function WhatMonth(){











	var IsToday = new Date()











     var TheMonth = GetMonth(IsToday.getMonth())











	return TheMonth }



































function GetEvents(num) {











	var TheDate = new Date()











	var StartDay = TheDate.getDate()











	var CurrentMonth = TheDate.getMonth()











	var EndDay = StartDay+num











	if (EndDay > GetEvent(0))











	{











	EndDay = GetEvent(0)











	}























	thisYr = TheDate.getYear()











	if (thisYr<1900)











	{











	thisYr=thisYr+1900











	}











	var ContentStr= "<b>"+WhatMonth()+" "+TheDate.getDate()+"-"+EndDay+"</b><br><br>"











	for ( i=StartDay; i <= EndDay; i++)











	{











	var NewDay = new Date(thisYr,CurrentMonth,i)











	var CurrentDay = GetDay(NewDay.getDay())











	var CurrentEvent = GetEvent(i)











		if (CurrentEvent != "")











		{











		ContentStr += "<b>"+CurrentDay+" ("+i+")"+"</b> <br>"+CurrentEvent+"<br><br>"











		}











	}











	return ContentStr











	}