// OldCalendar version 0.8 by Fr. Deacon Vincent Durstewitz
// August 19, 2002 (Gregorian calendar) - Feast of the Transfiguration
var dayName = new Array ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var monthName = new Array ("January","February","March","April","May","June","July","August","September","October","November","December")
// Let's get the system date
var now = new Date
// Let's subtract 13 days from the date
var tempdate;
tempdate = (now.getDate() -13);
//Fix for y2k
if (year < 1000)
year+=1900
// Let's be sure we are in the correct month
var oldMonth
	if (tempdate < 1) {
	oldMonth = (monthName[now.getMonth() -1 ])
	}
	else {
	oldMonth = (monthName[now.getMonth()])
	} 

var churchDate
	if ((tempdate < 1) && (oldMonth == "January")) {
	churchDate = (tempdate + 31);
	document.write ( ("church date: ") + (dayName[now.getDay()]) + (",  ") + (oldMonth) + (" ") + (churchDate) + ", " + (now.getYear()));
	}
	
	if ((tempdate < 1) && (oldMonth == "February")) {
	churchDate = (tempdate + 28);
	document.write ( ("church date: ") + (dayName[now.getDay()]) + (",  ") + (oldMonth) + (" ") + (churchDate) + ", " + (now.getYear()));
	}

	if ((tempdate < 1) && (oldMonth == "March")) {
	churchDate = (tempdate + 31);
	document.write ( ("church date: ") + (dayName[now.getDay()]) + (",  ") + (oldMonth) + (" ") + (churchDate) + ", " + (now.getYear()));
	}


	if ((tempdate < 1) && (oldMonth == "April")) {
	churchDate = (tempdate + 30);
	document.write ( ("church date: ") + (dayName[now.getDay()]) + (",  ") + (oldMonth) + (" ") + (churchDate) + ", " + (now.getYear()));
	}

	if ((tempdate < 1) && (oldMonth == "May")) {
	churchDate = (tempdate + 31);
	document.write ( ("church date: ") + (dayName[now.getDay()]) + (",  ") + (oldMonth) + (" ") + (churchDate) + ", " + (now.getYear()));
	}

	if ((tempdate < 1) && (oldMonth == "June")) {
	churchDate = (tempdate + 30);
	document.write ( ("church date: ") + (dayName[now.getDay()]) + (",  ") + (oldMonth) + (" ") + (churchDate) + ", " + (now.getYear()));
	}


	if ((tempdate < 1) && (oldMonth == "July")) {
	churchDate = (tempdate + 31);
	document.write ( ("church date: ") + (dayName[now.getDay()]) + (",  ") + (oldMonth) + (" ") + (churchDate) + ", " + (now.getYear()));
	}

	if ((tempdate < 1) && (oldMonth == "August")) {
	churchDate = (tempdate + 31);
	document.write ( ("church date: ") + (dayName[now.getDay()]) + (",  ") + (oldMonth) + (" ") + (churchDate) + ", " + (now.getYear()));
	}


	if ((tempdate < 1) && (oldMonth == "September")) {
	churchDate = (tempdate + 30);
	document.write ( ("church date: ") + (dayName[now.getDay()]) + (",  ") + (oldMonth) + (" ") + (churchDate) + ", " + (now.getYear()));
	}

	if ((tempdate < 1) && (oldMonth == "October")) {
	churchDate = (tempdate + 31);
	document.write ( ("church date: ") + (dayName[now.getDay()]) + (",  ") + (oldMonth) + (" ") + (churchDate) + ", " + (now.getYear()));
	}

	if ((tempdate < 1) && (oldMonth == "November")) {
	churchDate = (tempdate + 30);
	document.write ( ("church date: ") + (dayName[now.getDay()]) + (",  ") + (oldMonth) + (" ") + (churchDate) + ", " + (now.getYear()));
	}

	if ((tempdate < 1) && (oldMonth == "December")) {
	churchDate = (tempdate + 31);
	document.write ( ("church date: ") + (dayName[now.getDay()]) + (",  ") + (oldMonth) + (" ") + (churchDate) + ", " + (now.getYear()));
	}
	
	if (tempdate >= 1) {
	document.write ( ("church date: ") + (dayName[now.getDay()]) + (",  ") + (oldMonth) + (" ") + (tempdate) + (", ") + (now.getYear()));
	}
