function checkTime(i)
{
if (i<10) 
  {i="0" + i}
  return i
}

function getCalendarDate()
{
   var months = new Array(12);
   months[0]  = "January";
   months[1]  = "February";
   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";
   
   var now         = new Date();
   var monthday    = now.getDate();  
   var monthnumber = now.getMonth();
   var monthname   = months[monthnumber];
   var year        = now.getYear();
   
   monthday = checkTime(monthday)
   

   if(year < 2000) { year = year + 1900; }
   var dateString = year;
   return dateString;
}

function getClockTime()
{
   var now    = new Date();
   var hour   = now.getHours();
   var minute = now.getMinutes();
   var timeString = (hour < 10 ? "0" : "") + hour + ':' + (minute < 10 ? "0" : "") + minute;
   return timeString;
}

function getWeekid()
{
   var now = new Date();
   var monthday = now.getDate();

   monthday = checkTime(monthday)

   var monthdaytxt = monthday.toString();
   var monthnumber = now.getMonth() + 1;
   var year        = now.getYear();
   if(year < 2000) { year = year + 1900; }
   var weekid = monthdaytxt + '/' + monthnumber + '/'  + year;


}

function startTime()
{
var today=new Date()
var h=today.getHours()
var m=today.getMinutes()
var s=today.getSeconds()
// add a zero in front of numbers<10
m=checkTime(m)
s=checkTime(s)
document.getElementById('timetxt').innerHTML=h+":"+m+":"+s
t=setTimeout('startTime()',100)
}
