/* Gracefield Toastmasters Copyright 2002 */
/* Last Updated */
// 2003 Dec 18 Next meeting base date 2004
// 2003 Mar 22 writeDate, correct nextMeeting
// 2002 Dec 18 Next meeting base date
// 2002 Jun 21 Webstatistics
// 2002 Jun 16 Initial version
//
function writeDate (outDate)
{
var daylit = new Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat");
// can't make correct day display for IE4!
var mnlit = new Array("Jan", "Feb", "March", "April", "May", "June", "July", "Aug", "Sept", "Oct", "Nov", "Dec");
//document.writeln ('writeDate ',outDate);
if (outDate>0) {
  var yr=outDate.getYear();
  var mn=outDate.getMonth();
  var dy=outDate.getDate();
  var day=outDate.getDay();
// cater for variations in the way browsers handle dates!
    if (yr>=100 && yr<=999) yr-=100;
    if (yr<1000) yr+=2000;
// partially tested for Netscape and Explorer
  document.write (' ', yr,' ',mnlit[mn],' ',dy);
  }
}
//
function writeTime (outTime)
{
if (outTime>0) {
  var hr=outTime.getHours();
  var minute=outTime.getMinutes();
  document.write (' ', hr,':',minute);
  }
}
//
function nextMeeting ()
{
var meetday = new Date("may 2, 2007");
// writeDate (meetday);
var thisday = new Date();
// writeDate (thisday);
var milsec = 14*24*60*60*1000; // 14 days, 24 hours, 60 minutes, 60 seconds, 1000 milliseconds 
var diff = thisday.getTime()-meetday.getTime();
diff = Math.floor(diff/milsec);
// document.writeln (' diff ', diff);
var next = ((diff+1)*milsec) + meetday.getTime() + (60*60*1000); // additional period plus day
if (meetday > next) { next=meetday };
var temp = new Date();
    temp.setTime(next);
writeDate (temp);
}
//
function lastUpdated (statPage)
{
var lm=Date.parse(document.lastModified);
var dlm=new Date (lm);
document.writeln('<div class="modified" align="right">Updated ');
writeDate (dlm);
writeTime (dlm);
document.writeln('</div>');

//
//
//<!-- ADDFREESTATS.COM CODE V2 (Normal Page) -->
//<!-- CODE FOR YOUR PAGE: Index     -->
//<!-- URL : http://gracefieldtm.wellington.net.nz  -->
document.write("<a href=\"http://top.addfreestats.com/cgi-bin/main.cgi?usr=00114582", statPage, "\" target=\"_blank\">");
document.write("<img src=\"http://www1.addfreestats.com");
document.write("/cgi-bin/connect.cgi?");
document.write("usr=00114582", statPage);
document.write("&refer="+escape(document.referrer)+"");
document.write("&tips="+Math.random()+"");
document.writeln("\" alt=\"AddFreeStats\" border=0></A>");
//<!--  http://www.addfreestats.com -->
//<!-- END ADDFREESTATS.COM NORMAL CODE V2 - Free Web Stats -->
//
document.writeln('</div>')
}

