
inc_clock_js =
'<script type="text/javascript">\n<!--\n\nfunction init ( )\n'
+ '{\n  timeDisplay = document.createTextNode ( "" );\n  docu'
+ 'ment.getElementById("clock").appendChild ( timeDisplay )'
+ ';\n}\n\nfunction updateClock ( )\n{\n  var currentTime = new '
+ 'Date ( );\n\n  var currentHours = currentTime.getHours ( )'
+ ';\n  var currentMinutes = currentTime.getMinutes ( );\n  v'
+ 'ar currentSeconds = currentTime.getSeconds ( );\n\n  // Pa'
+ 'd the minutes and seconds with leading zeros, if require'
+ 'd\n  currentMinutes = ( currentMinutes < 10 ? "0" : "" ) '
+ '+ currentMinutes;\n  currentSeconds = ( currentSeconds < '
+ '10 ? "0" : "" ) + currentSeconds;\n\n  // Choose either "A'
+ 'M" or "PM" as appropriate\n  var timeOfDay = ( currentHou'
+ 'rs < 12 ) ? "AM" : "PM";\n\n  // Convert the hours compone'
+ 'nt to 12-hour format if needed\n  currentHours = ( curren'
+ 'tHours > 12 ) ? currentHours - 12 : currentHours;\n\n  // '
+ 'Convert an hours component of "0" to "12"\n  currentHours'
+ ' = ( currentHours == 0 ) ? 12 : currentHours;\n\n  // Comp'
+ 'ose the string for display\n  var currentTimeString = cur'
+ 'rentHours + ":" + currentMinutes + ":" + currentSeconds '
+ '+ " " + timeOfDay;\n\n  // Update the time display\n  docum'
+ 'ent.getElementById("clock").firstChild.nodeValue = curre'
+ 'ntTimeString;\n}\n\n// -->\n</script>';

// end_var_declaration
document.write(inc_clock_js);


<!--

function init ( )
{
  timeDisplay = document.createTextNode ( "" );
  document.getElementById("clock").appendChild ( timeDisplay );
}

function updateClock ( )
{
  var currentTime = new Date ( );

  var currentHours = currentTime.getHours ( );
  var currentMinutes = currentTime.getMinutes ( );
  var currentSeconds = currentTime.getSeconds ( );

  // Pad the minutes and seconds with leading zeros, if required
  currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
  currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;

  // Choose either "AM" or "PM" as appropriate
  var timeOfDay = ( currentHours < 12 ) ? "AM" : "PM";

  // Convert the hours component to 12-hour format if needed
  currentHours = ( currentHours > 12 ) ? currentHours - 12 : currentHours;

  // Convert an hours component of "0" to "12"
  currentHours = ( currentHours == 0 ) ? 12 : currentHours;

  // Compose the string for display
  var currentTimeString = currentHours + ":" + currentMinutes + ":" + currentSeconds + " " + timeOfDay;

  // Update the time display
  document.getElementById("clock").firstChild.nodeValue = currentTimeString;
}

// -->
