function runClock()
      {

         // The following is a constructor to create a Date() object called 'now'.

         var now = new Date();

	 /*
	    Collect all the information needed for the clock and store it
	    in appropriately named variables.  Remember the '=' sign is an
	    assignment operator meaning put the value on the right into the
	    named variable on the left.

	    getHours(), getMinutes() and getSeconds() are methods of the Date()
	    object.

	    You should note that I have now put the 'var' statement in the declaration
	    and initialization of the variables.  While JavaScript does not require
	    the 'var' you should get used to using it.  If omitted here, when JavaScript
	    creates the variables they are automatically created as global variables.
	    This could be a problem if we wrote a second function and tried to use
	    the same variable names.

	    Using the 'var' within the function forces JavaScript to create them as
	    local to the function only in which they are declared and will not be
	    available to other functions written on this page.  Garbage collection,
	    the clearing out of memory and returning control to the operating
	    system when the function is no longer needed, is more easily accomplished.
	 */

	 var hours = now.getHours();
	 var minutes = now.getMinutes();
	 var seconds = now.getSeconds();
	 var timeStr = new String();

	 // If the hours variable is 0 then it is midnight so put 12 for the hours,
	 // otherwise, if the hours are greater than 12 subtract 12,
	 // or else just display the hours.

	 timeStr =  ( ( hours   ==  0 ) ? "12"  : ( hours > 12 ) ? hours - 12 : hours );
	 timeStr += ( ( minutes <  10 ) ? ":0"  : ":"          ) + minutes;
	 timeStr += ( ( seconds <  10 ) ? ":0"  : ":"          ) + seconds;
	 timeStr += (   hours   >= 12 ) ? " PM" : " AM";

	 document.clock.face.value=timeStr;

	 setTimeout( "runClock()", 1000 );

      } 
