
/*
############################################
# AUTHOR AND COPYRIGHT INFORMATION         #
# CURRENT DATE DISPLAY V 2.1  Modified     #
# Originally written in 1999 for OMVK      #
# Michael Botsko // www.botsko.net         #
# Updated to Version 2.1 on 1-14-04        #
# Instructions:                            #
# Read the questions and then enter your   #
# answers within the double quotes "".     #
# Then your selections will be displayed   #
# accordingly.                             #
############################################
*/

// Would you like to display the date?
	var ShowDate="Yes" // Yes or No

	// Which date format would you like?
		//for: Sunday, January 1, 2002 type the number 1
		//for: January 1, 2002 type the number 2
		//for: 01/01/2002 type the number 3
	var UserAnswer="1"
	
	// Would you like the year to be displayed in Roman Numerals?
	var Roman="No"    // Yes or No

//  Would you like to display a timestamp?
	var ShowTime="No"    // Yes or No

	// If yes, - What format would you like the time?
		// 11:15:00 type in a value of 1
		// 11:15 type in a value of 2
	var TimeFormat="2"

	// Do you want to add the "th" "nd" or "st" after the date? "1st"
	var ShowProperDate="No"    // Yes or No

	// Do want the time and date on the same line?
	var SameLine="Yes"    //Yes and No

	// Would you like Military Time on or off?
	var MilitaryTime="Off"    // On or Off

	// Would you like to see the AM and PM?
	var TurnOnAMPM="Yes"    // Yes or No

// Would you like to show a welcome message? "Good Morning," etc?
	var ShowWelcome="No"    // Yes or No

	// Would you like it to be on the same line as the date?
	var WelcomeSameLine="No"    // Yes or No

// Would you like this all to be centered on the page?
	var Centered="No"     // Please type either Yes or No

	// What font color would you like?
	// Just type the name of any basic color: Red, black, etc 
	var fontcolor="black"

	// What font face would like?
	// Times New Roman, Arial, Verdana, Comic Sans MS, Courier New, etc
	var fontface="Arial"

	// What font size would you like? (-3,-2,-1,0,+1,+2,+3)
	var FontSize="+1"

// EVERYTHING YOU NEED TO READ STOPS HERE
//----------------------------------------------------------------

// DO NOT EDIT BELOW THIS LINE
// BASIC getDate INFORMATION

RightNow = new Date();
var janet = RightNow.getDate();
var bob = RightNow.getFullYear();
var bob2 = RightNow.getYear();
var charlie = RightNow.getMonth() + 1;
var mike = RightNow.getDay();
var theHour = RightNow.getHours();
var theMinutes = RightNow.getMinutes();
var theSeconds = RightNow.getSeconds();
var TimeZone = RightNow.toGMTString();

// ARRAY INFORMATION

var writtenday = new Array(7)
writtenday[0] = "Sunday"
writtenday[1] = "Monday"
writtenday[2] = "Tuesday"
writtenday[3] = "Wednesday"
writtenday[4] = "Thursday"
writtenday[5] = "Friday"
writtenday[6] = "Saturday"

var WriteMonth = new Array(13)
WriteMonth[0] = "null"
WriteMonth[1] = "January"
WriteMonth[2] = "February"
WriteMonth[3] = "March"
WriteMonth[4] = "April"
WriteMonth[5] = "May"
WriteMonth[6] = "June"
WriteMonth[7] = "July"
WriteMonth[8] = "August"
WriteMonth[9] = "September"
WriteMonth[10] = "October"
WriteMonth[11] = "November"
WriteMonth[12] = "December"
var NewDateValue = janet + 1

// IF AND ELSE STATEMENTS


if (TurnOnAMPM=="Yes") {
	if (theHour<="12"){AMPM="AM"}
	else {AMPM="PM"}
}


if (ShowWelcome=="Yes") {
if ((theHour>=0) && (theHour<=6)){ document.write("Good Early Morning")}
if ((theHour>=7) && (theHour<=11)){ document.write("Good Morning")}
if ((theHour>=12) && (theHour<=16)){ document.write("Good Afternoon")}
if ((theHour>=17) && (theHour<=20)){ document.write("Good Evening")}
if ((theHour>=21) && (theHour<=23)){ document.write("Good Night")}
}
else {document.write("")}
if (WelcomeSameLine=="Yes") {document.write("; it's ")}
else {document.write("")}

if (ShowProperDate=="Yes") {
end = "th";
if (janet==1 || janet==21 || janet==31) end="st";
if (janet==2 || janet==22) end="nd";
if (janet==3 || janet==23) end="rd";
janet+=end;
}
else {janet=janet}

if (MilitaryTime=="Off") {if (theHour>="13") theHour-=12 }

if (theSeconds < 10) {theSeconds="0"+theSeconds}
if (theMinutes < 10) {theMinutes="0"+theMinutes}
if (ShowDate=="Yes") {
if (UserAnswer=="1") {document.write("" + writtenday[mike] + ", " +WriteMonth[charlie] + " " + janet + ", " + bob + "")}
if (UserAnswer=="2") {document.write("" +WriteMonth[charlie] + " " + janet + ", " + bob + "")}
if (UserAnswer=="3") {document.write("" + charlie + "/" + janet + "/" + bob + "")}
if (SameLine=="No") {document.write("<br>")}
else {document.write("")}
}
else {document.write("")}
if (ShowTime == "Yes") {
 if (TimeFormat == "1") {document.write(" " + theHour + ":" + theMinutes + ":" + theSeconds + " ")}
 if (TimeFormat == "2") {document.write(" " + theHour + ":" + theMinutes + " ")}
document.write(" " + AMPM + " ")
}
else {}

if (Centered == "Yes") {document.write("")}

// End of Javascript

