/* ***********************************************************************
    The getYear method returns either a 2-digit or 4-digit year:
        * For years between and including 1900 and 1999, the value returned by
          getYear is the year minus 1900. For example, if the year is 1976, the
          value returned is 76.
        * For years less than 1900 or greater than 1999, the value returned by
          getYear is the four-digit year. For example, if the year is 1856, the
          value returned is 1856. If the year is 2026, the value returned is
          2026.

    This JavaScript displays the current date using arrays and is
    y2k compliant, using JavaScript 1.2 getFullYear() method that
    displays the year in 4 digits.

    This script works in Version 4+ browsers
********************************************************************** */



/* Detect Netscape browser version - We want the date to work in both version 3 and version 4+ browsers.  If browser is version 4+, then we will use the getFullYear() method.  getFullYear() also works in Explorer 4+. */



var currentDate = new Date();
var monthNumber = currentDate.getMonth()+1;
var dayNumber = (currentDate.getDay()) +1;
var dayOfMonth = (currentDate.getDate());



/* Determine which browser is being used and associate the correct method to find the current year.  Look for version 4 browsers and Netscape 3 */


var NN3, NN4, IE4

browser = navigator.appName;
version = parseInt(navigator.appVersion);


/* Detect version 4+ browsers */
if ((browser == "Microsoft Internet Explorer" && version >= 4) || (browser == "Netscape" && version >= 4)) {
   NN4 = true; 
   IE4 = true;
   var year = currentDate.getFullYear();
} 

/* Detect version 3 browsers */
if (browser == "Netscape" && version < 4) {
   NN3 = true;
   var year = (currentDate.getYear() < 1900) ? 1900 + currentDate.getYear() : currentDate.getYear(); 
}




/* This array lists all the days of the week, and the correct day will be select
ed by the variable dayNumber */

var day = new Array();
   day[0] = 7;
   day[1] = "Sun. ";
   day[2] = "Mon. ";
   day[3] = "Tues. ";
   day[4] = "Wed. ";
   day[5] = "Thurs. ";
   day[6] = "Fri. ";
   day[7] = "Sat. ";



/* This array lists all the months of the year, and the correct month will be se
lected by the variable monthNumber */                      


var month = new Array();
   month[0] = 12;
   month[1] = "Jan. ";
   month[2] = "Feb.";
   month[3] = "Mar.";
   month[4] = "Apr.";
   month[5] = "May";
   month[6] = "Jun.";
   month[7] = "Jul.";
   month[8] = "Aug.";
   month[9] = "Sept.";
   month[10] = "Oct.";
   month[11] = "Nov.";
   month[12] = "Dec.";                     




/* Show Current Date: */


document.write(month[monthNumber] + " " + dayOfMonth + ", " + year);





/* *********************** End of File *********************** */ 

