// this code displays the formatted time (see note below)

// note - this is the master copy. Any logic changes here need
// to be made in dest_time as well.

var curtime = new Date();
var curhour = curtime.getHours();
/*            ^^^^^^^ ------------ the dateObjectName */
/*                    ^^^^^^^^ --- the method */
var curmin = curtime.getMinutes();
var display_min = "0";
var am_pm;

// see if one digit minute
if (curmin < 10) {
   display_min = "0" + curmin;
   }
else {
   display_min = curmin;
   }

// look to see if it is noon (make it bold)   
if (curhour == 12) {
	curhour = 24; /* needed for next if statement */
}

// look to see if it is midnight (make it not bold)   
if (curhour == 0) {
	curhour = 12; /* needed for next if statement */
}

if (curhour < 13) {
	am_pm = "AM";
   	document.write(curhour + ":" + display_min + " " + am_pm + ",");
   }
else {
   	am_pm = "PM";
   	document.write("<b>" + (curhour - 12) + ":" + display_min + " " + am_pm + "</b>" + ",");
   }

// note that the AM is not bolded
// and the trailing comma never is

// note - this is the US format, need to see if locale variable
// will properly display time in the user's chosen format
