// JavaScript Document
<!--Hide from older browsers  

function startclock()

{
//This code gets the utc information

var utcDate= new Date();
var UtcHour= utcDate.getUTCHours();
var UtcMinute= utcDate.getUTCMinutes();
var UtcSecond= utcDate.getUTCSeconds();
var Utcweekday= utcDate.getUTCDay();
var Utcmonthname= utcDate.getUTCMonth();
var Utctoday= utcDate.getUTCDate();
var Utcyear= utcDate.getUTCFullYear();
var UtcAorP=" ";

//The code below adjusts the minutes displayed to two digits


if (UtcMinute < 10)
{
	UtcMinute= "0" + UtcMinute;
}

if (UtcSecond < 10)
{
	UtcSecond= "0" + UtcSecond;
}
//this code converts the displayed UTC time from 24hr to 12 hr format.

if (UtcHour>=12)
 
     UtcAorP="p.m.";

else
    UtcAorP="a.m.";

if (UtcHour>=13)
    UtcHour-=12;

if (UtcHour==0)
   UtcHour=12;

// this code sets the displayed day of week according to Utc;

if (Utcweekday==0)
  Utcweekday="Sunday";
if (Utcweekday==1)
  Utcweekday="Monday";
if (Utcweekday==2)
  Utcweekday="Tuesday";
if (Utcweekday==3)
  Utcweekday="Wednesday";
if (Utcweekday==4)
  Utcweekday="Thursday";
if (Utcweekday==5)
  Utcweekday="Friday";
if (Utcweekday==6)
  Utcweekday="Saturday";

// this code sets  the Utc displayed month;
if (Utcmonthname==0)
  Utcmonthname="Jan";
if (Utcmonthname==1)
  Utcmonthname="Feb";
if (Utcmonthname==2)
  Utcmonthname="Mar";
if (Utcmonthname==3)
  Utcmonthname="Apr";
if (Utcmonthname==4)
  Utcmonthname="May";
if (Utcmonthname==5)
  Utcmonthname="Jun";
if (Utcmonthname==6)
  Utcmonthname="Jul";
if (Utcmonthname==7)
  Utcmonthname="Aug";
if (Utcmonthname==8)
  Utcmonthname="Sep";
if (Utcmonthname==9)
  Utcmonthname="Oct";
if (Utcmonthname==10)
  Utcmonthname="Nov";
if (Utcmonthname==11)
  Utcmonthname="Dec";
  
// This code corrects the year displayed for some browers.  
if (Utcyear<=99)
Utcyear= "19"+Utcyear;

if ((Utcyear>99) && (Utcyear<2000))

Utcyear+=1900;  

document.clockform.clockspotutc.value="Universal Coordinated Time Is: "+ UtcHour +":"+ UtcMinute +":"+ UtcSecond +" "+UtcAorP+" UTC  On: " + Utcweekday + " " + Utcmonthname + " " + Utctoday + ", " + Utcyear;


// This code gets local time

var greeting;

var nowDate= new Date();
var nowHour= nowDate.getHours();
var nowMinute= nowDate.getMinutes();
var nowSecond= nowDate.getSeconds();
var weekday= nowDate.getDay();
var monthname= nowDate.getMonth();
var today= nowDate.getDate();
var year= nowDate.getYear();
var AorP=" ";



//The code below adjusts the minutes displayed to two digits


if (nowMinute < 10)
{
	nowMinute= "0" + nowMinute;
}

if (nowSecond < 10)
{
	nowSecond= "0" + nowSecond;
}

if (nowHour < 12)
{
	greeting= "Good Morning";
}

else if (nowHour < 17)
        
{
	greeting= "Good Afternoon";
}
else
{
	greeting= "Good Evening";
}

//this code converts the displayed time from 24hr to 12 hr format.

if (nowHour>=12)
 
     AorP="p.m.";

else
    AorP="a.m.";

if (nowHour>=13)
    nowHour-=12;

if (nowHour==0)
   nowHour=12;

// this code sets the displayed day of week;

if (weekday==0)
  weekday="Sunday";
if (weekday==1)
  weekday="Monday";
if (weekday==2)
  weekday="Tuesday";
if (weekday==3)
  weekday="Wednesday";
if (weekday==4)
  weekday="Thursday";
if (weekday==5)
  weekday="Friday";
if (weekday==6)
  weekday="Saturday";

// this code sets the way the month is displayed ;
if (monthname==0)
  monthname="Jan";
if (monthname==1)
  monthname="Feb";
if (monthname==2)
  monthname="Mar";
if (monthname==3)
  monthname="Apr";
if (monthname==4)
  monthname="May";
if (monthname==5)
  monthname="Jun";
if (monthname==6)
  monthname="Jul";
if (monthname==7)
  monthname="Aug";
if (monthname==8)
  monthname="Sep";
if (monthname==9)
  monthname="Oct";
if (monthname==10)
  monthname="Nov";
if (monthname==11)
  monthname="Dec";
  
// This code corrects the year displayed for some browers.  
if (year<=99)
year= "19"+year;

if ((year>99) && (year<2000))
year+=1900;  


document.clockform.clockspot.value=greeting +", The Local Time is: " + nowHour +":"+ nowMinute +":"+ nowSecond +" "+AorP+" On: " + weekday + " " + monthname + " " + today + ", " + year;

setTimeout('startclock()',1000);
}

// End hidding -->
