// File Name:	jsWelcomeDate.js
// File Type:	JScript
// Author:	Darren Cruise @ CruzyDesigns.com
// Copyright:	© 2001 G.R. Paret Realty. All rights reserved.
// Date:	March 11, 2001
// Description:	This script reads the computers present date
//		then writes that date to the web page automatically.
// -------------------------------------------------------------------
<!-- Begin WelcomeDate Code 

// Declaring variables and arrays.
d = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
m = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
today = new Date();
day = today.getDate();
year = today.getYear();

// Adds ending to "day".
if (year < 2000) year = year + 1900;
end = "th";
if (day==1 || day==21 || day==31) end="st";
if (day==2 || day==22) end="nd";
if (day==3 || day==23) end="rd";
day+=end;

// Format of font size, colour, and face using HTML tags.
document.write("<B><FONT SIZE='-1' COLOR='#000000' FACE='Verdana, Arial'>");

// Writes date to web page.
document.write(d[today.getDay()]+", "+m[today.getMonth()]+" "+day+", "+year);

// Closes HTML tags.
document.write("</FONT></B><BR>");

// End WelcomeDate Code -->
// -------------------------------------------------------------------