   
   
 {
 
 /*-- returns the date as a long string, then the var 'Greeting' is assigned a text string (i.e 'Good Morning' ) according to the time of day in 24 hundred hours (military time) --*/

      var date = new Date()
	  var Hour=date.getHours()
     
	 if (Hour<=4)
var Greeting = "Good Morning ! " + "<br>" + "Shouldn't you be in bed sleepy head ?"

if(Hour<=11)
var Greeting="Good Morning ! "

else
if (Hour<=17)

var Greeting="Good Afternoon ! "

else 
var Greeting="Good Evening ! "

<!-- assigns the days of the week to a group of variables -->
    days = new Array(6)
    days[0] = "Sunday";
    days[1] = "Monday";
    days[2] = "Tuesday"; 
    days[3] = "Wednesday";
    days[4] = "Thursday";
    days[5] = "Friday";
    days[6] = "Saturday";
	
  <!-- assigns the months of the year to a group of variables -->	
	months =new Array(11)
	months[0] = "January";
	months[1] = "Febuary";
	months[2] = "March";
	months[3] = "April";
	months[4] = "May";
	months[5] = "June";
	months[6] = "July";
	months[7] = "August";
	months[8] = "September";
	months[9] = "October";
	months[10] = "November";
	months[11] = "December";
	
	
	
	<!-- .getDay Returns the number of days into the week: (0-6) and assigns it to the variable "day" -->
    <!-- Does the same for the month, year and date-->
    var day = date.getDay()
	var month = date.getMonth()
	var year= date.getYear()
	var date = date.getDate()
	
	
	<!-- [day] and days are compared and when they match, the corresponding day i.e monday is assigned-->
	<!-- to the var "day" and the same with the month -->
	var day = days[day]
	var month = months[month]
	
	<!-- for netscape compatbility -->
	<!-- netscape displays 2001 as 101 (1900 less than actual date)-->
	<!-- so 1900 is added if year comes up under 200 -->
	
	if
	  (year < 200)
	  var year = (year + 1900)
	  else
	  var year = year 
	  }
	  
	var date = day + " " + month +  " " + date +  ", " + year
