// JavaScript Document

/*This function accomplishes the adding of zero in front of values that are less than 10...*/
function checkTime(intI)
{//Opening brace for the function checkTime
  if(intI<10){intI="0"+intI;}
  return intI;
}//Closing brace for the function checkTime
  
/*This function displays the current date for the application*/  
function showDate()
{//Opening brace for the function showDate
  var mDisplay;
  var currentTime = new Date();
  var month = currentTime.getMonth() + 1;
  if(month==1){mDisplay="January";}else if(month==2){mDisplay="February";} else if(month==3){mDisplay="March";} else if(month==4){mDisplay="April";}
  if(month==5){mDisplay="May";}else if(month==6){mDisplay="June";} else if(month==7){mDisplay="July";} else if(month==8){mDisplay="August";}
  if(month==9){mDisplay="September";}else if(month==10){mDisplay="October";} else if(month==11){mDisplay="November";} else if(month==12){mDisplay="December";}
  var day=currentTime.getDate();
  var year=currentTime.getFullYear();
  document.getElementById("showdate").innerHTML=mDisplay + " " + day + ", " + year;
}//Closing brace for the function showDate 

/*This function displays the current time*/
function startTime()<!--Function to display timer on the web page... -->
{//Opening brace for the function startTime
  var dateObj=new Date();
  var hourObj=dateObj.getHours();
  var minObj=dateObj.getMinutes();
  var secObj=dateObj.getSeconds();
  //Then add a zero in front of numbers that are less than 10
  minObj=checkTime(minObj);
  secObj=checkTime(secObj);
  document.getElementById('timer').innerHTML=hourObj + ":" + minObj + ":" + secObj;
  timerObj=setTimeout('startTime()',500);
}//Closing brace for the function startTime
