<!--
var dayName = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var months = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var dayNumber = new Array("0th","1st","2nd","3rd","4th","5th","6th","7th","8th","9th","10th","11th","12th","13th","14th","15th","16th","17th","18th","19th","20th","21st","22nd","23rd","24th","25th","26th","27th","28th","29th","30th","31st");

function showTheHours(theHour)
{
	if (theHour == 0) {return (12);}
	if (theHour < 13) {return (theHour);}
	else {return (theHour-12);}
}
function showZeroFill(number)
{
	if (number > 9) {return ":" + number;}
	else {return ":0" + number;}
}
function showAmPm(thatTime)
{
	if (thatTime < 12) {return (" AM");}
	else {return (" PM");}
}
function tellTheTime(tz)
{
	// Note: tz is timezone offset = 0 for London, -5 for New York
	var now = new Date();
	var month = now.getMonth();
	dateStr = now.toGMTString();
	dateStr = dateStr.substr(0,dateStr.length - 3);
	now.setTime(Date.parse(dateStr));
	if (month>2 && month<10)
		now.setHours(now.getHours() + tz + 1);	// DST
	else
		now.setHours(now.getHours() + tz);		// EST
	return ("The time where I'm at is " + showTheHours(now.getHours()) + showZeroFill(now.getMinutes()) + showZeroFill(now.getSeconds()) + showAmPm(now.getHours()) + ".");
}
function tellTheDayTime(tz)
{
	// Note: tz is timezone offset = 0 for London, -5 for New York
	var now = new Date();
	var month = now.getMonth();
	dateStr = now.toGMTString();
	dateStr = dateStr.substr(0,dateStr.length - 3);
	now.setTime(Date.parse(dateStr));
	if (month>2 && month<10)
		now.setHours(now.getHours() + tz + 1);	// DST
	else
		now.setHours(now.getHours() + tz);		// EST
	return ("The time where I'm at is " + showTheHours(now.getHours()) + showZeroFill(now.getMinutes()) + "");
}
function tellTheDay()
{
	var now = new Date();
	return ("Today is " + dayName[now.getDay()] + ".");
}
function tellTheDate()
{
	var now = new Date();
	var month = now.getMonth();
	var day = now.getDate();
	var year = now.getYear();

	if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000)) year = "19" + year;
	if (navigator.appName == "Netscape") year = 1900 + year;

	return ("Today's date is " + months[month] + " " + day + ", " + year + ".");
}
function today()
{
	var now = new Date();
	var month = now.getMonth();
	var day = now.getDate();
	var year = now.getYear();

	if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000)) year = "19" + year;
	if (navigator.appName == "Netscape") year = 1900 + year;

	return ("Today is " + dayName[now.getDay()] + ", " + months[month] + " " + dayNumber[day] + ", " + year + ".");
}
function tellTheYear()
{
	var now = new Date();
	var month = now.getMonth();
	var day = now.getDate();
	var year = now.getYear();

	if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000)) year = "19" + year;
	if (navigator.appName == "Netscape") year = 1900 + year;

	return ("The year is " + year + ".");
}
function tellTheMonth()
{
	var now = new Date();
	var month = now.getMonth();
	var day = now.getDate();
	var year = now.getYear();

	if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000)) year = "19" + year;
	if (navigator.appName == "Netscape") year = 1900 + year;

	return ("The month is " + months[month] + ".");
}
function yesterday()
{
	var now = new Date();
	var month = now.getMonth();
	var dateStr = now.toGMTString();
	dateStr = dateStr.substr(0,dateStr.length - 3);
	now.setTime(Date.parse(dateStr));
	if (month>2 && month<10)
		now.setHours(now.getHours() - 28);	// DST
	else
		now.setHours(now.getHours() - 29);	// EST
	var day = now.getDate();
	var year = now.getYear();

	if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000)) year = "19" + year;
	if (navigator.appName == "Netscape") year = 1900 + year;

	return ("Yesterday was " + dayName[now.getDay()] + ", " + months[month] + " " + dayNumber[day] + ", " + year + ".");
}
function tomorrow()
{
	var now = new Date();
	var month = now.getMonth();
	var dateStr = now.toGMTString();
	dateStr = dateStr.substr(0,dateStr.length - 3);
	now.setTime(Date.parse(dateStr));
	if (month>2 && month<10)
		now.setHours(now.getHours() + 16);	// DST
	else
		now.setHours(now.getHours() + 15);	// EST
	var day = now.getDate();
	var year = now.getYear();

	if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000)) year = "19" + year;
	if (navigator.appName == "Netscape") year = 1900 + year;

	return ("Tomorrow will be " + dayName[now.getDay()] + ", " + months[month] + " " + dayNumber[day] + ", " + year + ".");
}
function dayBeforeYesterday()
{
	var now = new Date();
	var month = now.getMonth();
	var dateStr = now.toGMTString();
	dateStr = dateStr.substr(0,dateStr.length - 3);
	now.setTime(Date.parse(dateStr));
	if (month>2 && month<10)
		now.setHours(now.getHours() - 52);	// DST
	else
		now.setHours(now.getHours() - 53);	// EST
	var day = now.getDate();
	var year = now.getYear();

	if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000)) year = "19" + year;
	if (navigator.appName == "Netscape") year = 1900 + year;

	return ("The day before yesterday was " + dayName[now.getDay()] + ", " + months[month] + " " + dayNumber[day] + ", " + year + ".");
}
function dayAfterTomorrow()
{
	var now = new Date();
	var month = now.getMonth();
	var dateStr = now.toGMTString();
	dateStr = dateStr.substr(0,dateStr.length - 3);
	now.setTime(Date.parse(dateStr));
	if (month>2 && month<10)
		now.setHours(now.getHours() + 40);	// DST
	else
		now.setHours(now.getHours() + 39);	// EST
	var day = now.getDate();
	var year = now.getYear();

	if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000)) year = "19" + year;
	if (navigator.appName == "Netscape") year = 1900 + year;

	return ("The day after tomorrow will be " + dayName[now.getDay()] + ", " + months[month] + " " + dayNumber[day] + ", " + year + ".");
}
function holiday()
{
	var now   = new Date();
	var month = now.getMonth();
	var day   = now.getDate();

	if (month == 0 && day == 1)
		return ("Happy New Year!");
	else if (month == 1 && day == 14)
		return ("Happy Valentine's Day!");
      else if (month == 2 && day == 17)
		return ("Happy St. Patrick's Day!");
	else if (month == 6 && day == 4)
		return ("Happy 4th of July!");
      else if (month == 9 && day == 31)
		return ("Happy Halloween!");
	else if (month == 11 && day == 23)
		return ("Season's Greetings!");
      else if (month == 11 && day == 24)
		return ("Happy Holidays!");
      else if (month == 11 && day == 25)
		return ("Merry Christmas!");
	else
		return "";
}
function temperature()
{
	var now   = new Date();
	var month = now.getMonth();
	
	if (month == 0)
		return ("It's around 37 degrees.");
	else if (month == 1)
		return ("It's around 45 degrees.");
      else if (month == 2)
		return ("It's around 65 degrees.");
	else if (month == 3)
		return ("It's around 70 degrees.");
      else if (month == 4)
		return ("It's around 78 degrees.");
	else if (month == 5)
		return ("It's around 90 degrees.");
      else if (month == 6)
		return ("It's around 92 degrees.");
      else if (month == 7)
		return ("It's around 91 degrees.");
      else if (month == 8)
		return ("It's around 72 degrees.");
      else if (month == 9)
		return ("It's around 59 degrees.");
      else if (month == 10)
		return ("It's around 51 degrees.");
      else if (month == 11)
		return ("It's around 42 degrees.");
}
function season()
{
	var now   = new Date();
	var month = now.getMonth();
	
	if (month == 0)
		return ("Well that would depend on what part of the world you live in but for me it's winter.");
	else if (month == 1)
		return ("Well that would depend on what part of the world you live in but for me it's winter.");
      else if (month == 2)
		return ("Well that would depend on what part of the world you live in but for me it's spring.");
	else if (month == 3)
		return ("Well that would depend on what part of the world you live in but for me it's spring.");
      else if (month == 4)
		return ("Well that would depend on what part of the world you live in but for me it's spring.");
	else if (month == 5)
		return ("Well that would depend on what part of the world you live in but for me it's summer.");
      else if (month == 6)
		return ("Well that would depend on what part of the world you live in but for me it's summer.");
      else if (month == 7)
		return ("Well that would depend on what part of the world you live in but for me it's summer.");
      else if (month == 8)
		return ("Well that would depend on what part of the world you live in but for me it's autumn.");
      else if (month == 9)
		return ("Well that would depend on what part of the world you live in but for me it's autumn.");
      else if (month == 10)
		return ("Well that would depend on what part of the world you live in but for me it's autumn.");
      else if (month == 11)
		return ("Well that would depend on what part of the world you live in but for me it's winter.");
}

function time()
{

      var day = new Date();
      var hr = day.getHours();
      var minutes = day.getMinutes(); 
      
      if (hr == 0) 
          return (""+tellTheDayTime(-5)+" at night.");
     	else if (hr == 1)
		return (""+tellTheDayTime(-5)+" in the morning.");
      else if (hr == 2)
		return (""+tellTheDayTime(-5)+" in the morning.");
	else if (hr == 3)
		return (""+tellTheDayTime(-5)+" in the morning.");
      else if (hr == 4)
		return (""+tellTheDayTime(-5)+" in the morning.");
	else if (hr == 5)
		return (""+tellTheDayTime(-5)+" in the morning.");
      else if (hr == 6)
		return (""+tellTheDayTime(-5)+" in the morning.");
      else if (hr == 7)
		return (""+tellTheDayTime(-5)+" in the morning.");
      else if (hr == 8)
		return (""+tellTheDayTime(-5)+" in the morning.");
      else if (hr == 9)
		return (""+tellTheDayTime(-5)+" in the morning.");
      else if (hr == 10)
		return (""+tellTheDayTime(-5)+" in the morning.");
      else if (hr == 11)
		return (""+tellTheDayTime(-5)+" in the morning.");
      else if (hr == 12)
		return (""+tellTheDayTime(-5)+" noon.");
      else if (hr == 13)
		return (""+tellTheDayTime(-5)+" in the afternoon.");
	else if (hr == 14)   
		return (""+tellTheDayTime(-5)+" in the afternoon.");
      else if (hr == 15)
		return (""+tellTheDayTime(-5)+" in the afternoon.");
	else if (hr == 16)
		return (""+tellTheDayTime(-5)+" in the afternoon.");
      else if (hr == 17)
		return (""+tellTheDayTime(-5)+" in the afternoon.");
      else if (hr == 18)
		return (""+tellTheDayTime(-5)+" in the evening.");
      else if (hr == 19)
		return (""+tellTheDayTime(-5)+" in the evening.");
      else if (hr == 20)
		return (""+tellTheDayTime(-5)+" in the evening.");
      else if (hr == 21)
		return (""+tellTheDayTime(-5)+" in the evening.");
      else if (hr == 22)
		return (""+tellTheDayTime(-5)+" in the evening.");
      else if (hr == 23)
		return (""+tellTheDayTime(-5)+" in the evening.");
}

function daynight()
{

day = new Date()
hr = day.getHours()

if ((hr == 1) || (hr == 2) || (hr == 3) || (hr == 4)) return ("Well, where I live there's a moon on the right side of the screen so it's night.");
if ((hr == 5) || (hr == 6)) return ("Well, where I live there's a star on the right side of the screen so it's night.");
if ((hr == 19) || (hr == 20) || (hr == 21) || (hr == 22) || (hr == 23) || (hr == 24)) return ("Well, where I live there's a moon on the right side of the screen so it's night.");
if ((hr == 7) || (hr == 8) || (hr == 9) || (hr == 10) || (hr == 11) || (hr == 12) || (hr == 13) || (hr == 14) || (hr == 15) || (hr == 16) || (hr == 17) || (hr == 18)) return ("Well, where I live there's a sun on the right side of the screen so it's day.");
if ((hr == 19) || (hr == 20)) return ("Well, where I live there's a star on the right side of the screen so it's night.");
if ((hr == 21) || (hr == 22)) return ("Well, where I live I see a comet flying by so it must be night.");
if (hr == 23) return ("Well, where I live I see Saturn quite clearly so it must be night.");
}
//-->



