/// ***********************************************
// AUTHOR: WWW.CGISCRIPT.NET, LLC
// URL: http://www.cgiscript.net
// Use the script, just leave this message intact.
// Download your FREE CGI/Perl Scripts today!
// ( http://www.cgiscript.net/scripts.htm )
// ***********************************************

// Get today's current date.
var now = new Date();

// Array list of days.
var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');

// Array list of months.
var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');

// Calculate the number of the current day in the week.
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

// Calculate four digit year.
function fourdigits(number)	{
	return (number < 1000) ? number + 1900 : number;
								}

// Join it all together
today =  days[now.getDay()] + ", " +
              months[now.getMonth()] + " " +
               date + ", " +
                (fourdigits(now.getYear())) ;

// Print out the data.\
CN_Now = new Date();
localtime = CN_Now.toString();
CN_Hours = CN_Now.getHours();
if (CN_Hours >=6 && CN_Hours < 10) {
	document.write("Aloha kakahiaka <br> (Good Morning!)");
} else {
	if (CN_Hours >= 10 && CN_Hours < 15) {
	document.write("Aloha awakea <br> (Good Midday!)");
	} else {
	if (CN_Hours >= 15 && CN_Hours < 18) {
		document.write("Aloha 'auinal&#257; <br> (Good Afternoon!)");
	} else {
	if (CN_Hours >= 18 && CN_Hours < 24) {
		document.write("Aloha ahiahi <br>(Good Evening!)");
	} else {
	document.write("Aloha aumoe <br> (Good Night!)");
}
}
}
}
document.write("<BR>Today is " +today+ ".");