function writeTime() {

  // get a date object
  var today = new Date();

  // ask the object for some information
  var hours = today.getHours();
  var minutes = today.getMinutes();
  var seconds = today.getSeconds();
  var theHour = today.getHours();


  minutes = fixTime(minutes);
  seconds = fixTime(seconds);

  // put together the time string and write it out
  if(hours>12){hours = hours-12; timeSuffix = ' PM';}
  	else{timeSuffix = ' AM';}

  var fixedTime = hours + ":" + minutes + ":" + seconds + timeSuffix;

  if ((theHour >= 4) && (theHour < 12)){
  var output = 'Good Morning and Welcome to TissueGrown.com.  It is currently ' + fixedTime}
  if ((theHour >= 12) && (theHour < 18)){
  var output = 'Good Afternoon and Welcome to TissueGrown.com.  It is currently ' + fixedTime}
  if ((theHour >= 18) && (theHour < 22)){
  var output = 'Good Evening and Welcome to TissueGrown.com.  It is currently ' + fixedTime}
  if (theHour >= 22){
  var output = 'Good Night and Welcome to TissueGrown.com.  It is currently ' + fixedTime}
  if (theHour < 4){
  var output = 'Good Night and Welcome to TissueGrown.com.  It is currently ' + fixedTime}

  document.getElementById("theTime").innerHTML = output;


  // run this function again in half a second
  the_timeout = setTimeout('writeTime();',500);
}

function fixTime(the_time) {
	if (the_time <10)
	{
		the_time = "0" + the_time;
	}
	return the_time;
}
