/*
* timeImage.js
* by Kevin Chin. v1.00 000404
* Copyright (c) 2000 All Rights Reserved.
* You may use this code on a public Web
* site only if this entire copyright notice
* appears unchanged. Not much of a price is it?
*
* Contact chin@cs.ucdavis.edu for all other uses.
*/

var theDate = new Date();
var myTimeString = "";          // time text
var myTimeStringImage = "";     // time images
var theYear;                    // year
var currentDay;                 // day
var currentMonth;               // month

// day array for text
dayArray = new Array("Sunday, ", "Monday, ", "Tuesday, ", "Wednesday, ", "Thursday, ", "Friday, ", "Saturday, ")

// text for day
currentDay = theDate.getDay();
myDay = dayArray[theDate.getDay()];
//myTimeString += dayArray[theDate.getDay()];

// month array for text
monthArray = new Array("Jan. ", "Feb. ", "Mar. ", "Apr. ", "May ", "June ", "July ", "Aug. ", "Sep. ", "Oct. ", "Nov. ", "Dec. ")

// text for month, date, and comma
currentMonth = theDate.getMonth();
currentDate_10 = currentDate_1 = theDate.getDate();
myTimeString += monthArray[theDate.getMonth()];
myTimeString += theDate.getDate();
myTimeString += ", ";

// text for year
theYear = theDate.getYear();

// used for Netscape and IE Y2K issue
if (theYear < 2000)
{
  theYear += 1900;
}

myTimeString += theYear;

currentHours = theDate.getHours();
myTime = currentHours+":";
currentMinutes = theDate.getMinutes();
if (currentMinutes < 9)
{
	currentMinutes = "0" + currentMinutes
}
myTime += currentMinutes;

// writes time text
document.writeln(myDay);
document.writeln(myTimeString+" ");
document.writeln(myTime);
