﻿function goodmorning()
{
	document.write("Good ");
	var dtmDate = new Date();		
	var lngHours = dtmDate.getHours();
	var random = Math.random(); 
	var random2 = Math.random(); 
	if (lngHours <= 11)
	{
		if (random < 0.1)
		{
			document.write("Moaning");
		}
		else
		{
			document.write("Morning");
		}
	}
	else if (lngHours >= 12 && lngHours <= 17)
	{
		document.write("Afternoon");
	}
	else
	{
		if (random < 0.9)
		{
			document.write("Evening");
		}
		else
		{
			if (random2 < 0.5)
			{
				document.write("Heavens!");
			}
			else
			{
				document.write("Golly Ms Molly!");
			}
		}
	}
}

function ntcdate()
{
	<!-- This script and many more are available free online at -->
	<!-- The JavaScript Source!! http://javascript.internet.com -->
	var months=new Array(13);
	months[1]="January";
	months[2]="February";
	months[3]="March";
	months[4]="April";
	months[5]="May";
	months[6]="June";
	months[7]="July";
	months[8]="August";
	months[9]="September";
	months[10]="October";
	months[11]="November";
	months[12]="December";
	var time=new Date();
	var lmonth=months[time.getMonth() + 1];
	var date=time.getDate();
	var year=time.getYear();
	if (year < 2000)    // Y2K Fix, Isaac Powell
	year = year + 1900; // http://onyx.idbsu.edu/~ipowell  
	document.write(date + " " + lmonth + " " + year)
}