function setLocalDates() {
/*  This function is to be called by the OnLoad tag
of a BODY element. It loops through every TD
(Table Data) element, looking for the data-gmtdate
attribute, taking the GMT date stored there and
using it to populate the innerHTML and the title
of the table cell. So, dates will be displayed
in the user's local time zone.
*/
var elems,c,d,i,s
elems = document.getElementsByTagName('TD')
for (i = 0; i < (elems.length); i++)  {
c = elems[i].getAttribute('data-gmtdate');
if (c) {
d = new Date(c);
s = d.getFullYear() + '-' + lz(d.getMonth() + 1) + '-' + lz(d.getDate()) + ' ' + lz(d.getHours()) + ':' + lz(d.getMinutes()) ;
elems[i].innerText = s.substring(0, 10);
elems[i].title = s;
}