<!-- 

// get the suffix for today 
  function GetSuffix(adate) { 
    if (adate == 1 || adate == 21 || adate == 31 || adate == 41) {suffix = "st"} 
    else 
    if (adate == 2 || adate == 22 || adate == 32 || adate == 42) {suffix = "nd"} 
    else 
    if (adate == 3 || adate == 23 || adate == 33 || adate == 43) {suffix = "rd"} 
    else {suffix = "th"} 
    return suffix; 
  } 

// get the AM or PM for a time 
  function GetAMPM(anhour) { 
    if (anhour > 11) {ampm = "pm"} 
    else {ampm = "am"} 
    return ampm; 
  } 

// get the minutes and put a leading zero if necessary 
  function GetZero(atime) { 
    if (atime < 10) {atime = "0" + atime} 
    return atime; 
  } 


// start the table
  function flagtest(flag) {
    if ( flag == 0 ) {
//	document.write("<TABLE class='border' cellpadding=6 cellspacing=0><TR><TD>"); 
	document.write("<fieldset>");
	document.write("<legend>coming soon</legend>");
    } 
    return flag;
  }


// arrays of date names 
  var weekday = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"); 
  var month = new Array("January","February","March","April","May","June","July","August","September","October","November","December"); 

  var dates    = new Array( 
                        "Tue, 1 Jan 1965 00:00:00",                     "Wed, 5 Jan 2000 00:00:00", 
                           "Tue, 8 Jan 2002 00:00:00",                  "Sat, 19 Jan 1967 00:00:00", 
                           "Fri, 8 Feb 2002 00:00:00",                  "Fri, 11 Feb 2000 00:00:00", "Fri, 18 Feb 2005 00:00:00", 
                           "Thu, 1 Mar 2000 00:00:00","Thu, 2 Mar 2000 00:00:00",                  "Thu, 14 Apr 2002 00:00:00", 
                           "Thu, 19 Apr 2002 00:00:00",                 "Thu, 22 Apr 2002 00:00:00", 
                           "Thu, 3 May 2002 00:00:00",                  "Thu, 4 May 2002 00:00:00", 
                           "Thu, 7 May 1968 00:00:00","Thu, 7 May 1968 00:00:00","Thu, 8 May 2005 00:00:00","Thu, 9 May 2003 00:00:00","Thu, 13 May 1967 00:00:00",
			   "Thu, 21 May 2005 00:00:00","Thu, 3 Jun 2005 00:00:00",
                           "Thu, 12 Jun 2002 00:00:00","Thu, 15 Jun 2005 00:00:00",                 "Thu, 20 Jun 1967 00:00:00", 
                           "Thu, 20 Jun 2002 00:00:00",                 "Thu, 21 Jun 1991 00:00:00", 
                           "Thu, 21 Jun 2002 00:00:00",                 "Thu, 21 Jun 2001 00:00:00", 
                           "Thu, 22 Jun 1965 00:00:00",                 "Thu, 3 Jul 2002 00:00:00", 
                           "Mon, 15 Jul 2002 00:00:00",                 "Thu, 22 Jul 2000 00:00:00", 
                           "Thu, 4 Aug 2002 00:00:00",                  "Thu, 15 Aug 2002 00:00:00", 
                        "Tue, 20 Aug 2002 00:00:00",                    "Thu, 24 Aug 2002 00:00:00", 
                        "Thu, 26 Aug 2002 00:00:00",                    "Thu, 31 Aug 2002 00:00:00", 
                        "Thu, 2 Sep 2002 00:00:00",                     "Thu, 7 Sep 2002 00:00:00", 
                        "Thu, 12 Sep 2002 00:00:00",                    "Thu, 1 Oct 2000 00:00:00",	"Thu, 3 Oct 2001 00:00:00", 
                        "Thu, 6 Oct 2002 00:00:00","Thu, 6 Oct 2002 00:00:00",			"Thu, 21 Oct 2002 00:00:00",
			"Thu, 26 Oct 2002 00:00:00",			"Thu, 9 Nov 2002 00:00:00",
			"Thu, 20 Nov 2002 00:00:00",			"Thu, 25 Nov 2002 00:00:00",
			"Thu, 27 Nov 2002 00:00:00",			"Thu, 30 Nov 2004 00:00:00",			"Thu, 7 Dec 2002 00:00:00",
			"Thu, 14 Dec 2000 00:00:00"
                        ); 
  var events   = new Array( 
                        "Richard Heppell's xx birthday",                           "Charlie's birthday", 
                           "Julie Smith's birthday",                            "Paul Sawdon's xx birthday", 
                           "James Greenway's xx birthday",                              "George Emerson's xx birthday", "Beech Mason-Smith's xx birthday", 
                           "Matthew Goodeve's xx birthday","Sophie Bennett's birthday",                         "Andy White's birthday", 
                           "Nicola's birthday",                                 "Paul Pollard's birthday", 
                           "Sophie Cassidy's birthday",                         "Kev and Jules' xx wedding anniversary", 
                           "Coops' xx birthday","Elliot Cooper's xx birthday","Jessica Dixon's xx birthday","Tim Cooper's xx birthday","Colin's xx birthday",
			   "Hannah Mills' xx birthday","Michael and Alexander Cassidy's xx birthday", 
                           "Davey's xx birthday","Milly's xx birthday",                                  "Andy Cox's xx birthday", 
                           "Kev Murphy's xx birthday",                             "FCFC's xx anniversary", 
                           "Paul and Jane's wedding anniversary",            "Sean Green's xx birthday", 
                           "Kev Goodeve's xx birthday",                            "Phil's xx birthday", 
                           "James Murphy's xx birthday",                                   "Colin and Helen's xx wedding anniversary", 
                           "Dicko's xx birthday",                                       "Robert Bennett's xx birthday", 
                           "Thomas Cairns' xx birthday",                           "Keith's xx birthday", 
                           "Paul and Christine's xx wedding anniversary",       "Alan and Anne-Marie's xx wedding anniversary", 
                           "Lorna's birthday",                                  "Merse's birthday", 
                        "Helen Mason-Smith's birthday",                 "Thomas Cox's xx birthday",	"Jamie Johnson's xx birthday", 
                        "Neil's xx birthday","Bruce's xx birthday",				"Isaac Pollard's xx birthday",
			"JC and Sophie's xx wedding anniversary",		"Teasy's xx birthday",
                        "Francesca Green's xx birthday",			"Anne-Marie Cooper-Kjuit's birthday",
			"JC's birthday",                        "Edward Shepherd's xx birthday",                        "Jimmy Sawdon's xx birthday",
			"Christine's birthday"
                        ); 
  var annual   = new Array("A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A","A"); 
  var startyear = new Array( 
                           "1964",          "", 
                           "",          "1967", 
                           "2002",              "2000","2005", 
                           "2004","",          "", 
                           "",          "", 
                           "",          "2002", 
                           "1968","2006","2005","2003","1967",
			   "2005","2005",
                           "1967","2003",          "1967", 
                           "1968",          "1991", 
                           "",          "2001", 
                           "1965",          "1967", 
                           "2002",          "2000", 
                           "1963",              "2002", 
                        "2002",         "1966", 
                        "1995",         "2002", 
                        "",             "", 
                        "1967",         "2000","2001", 
                        "1969","1967",         "2002",
			"2000",		"1970",
		        "1998",		"",
			"",		"2004",		"2000",
			"1967"
                        ); 

  var now = new Date(); 
//	var now = new Date("2005","6","12");
  var nextweek = new Date(); 
  var daysinadvance = 14; 
  nextweek.setTime(now.getTime() + (daysinadvance * 24 * 60 * 60 * 1000)); 

  var count =0 ; 

// document.write("now : " + weekday[now.getDay()] + " " + month[now.getMonth()] + " " + now.getDate() + GetSuffix(now.getDate()) + ", " + now.getFullYear() + ", " +  GetZero(now.getHours()) + ":" + GetZero(now.getMinutes()) + GetAMPM(now.getHours()) + "<br>"); 
// document.write("nextweek : " + weekday[nextweek.getDay()] + " " + month[nextweek.getMonth()] + " " + nextweek.getDate() + GetSuffix(nextweek.getDate()) + ", " + nextweek.getFullYear() + ", " +  GetZero(nextweek.getHours()) + ":" + GetZero(nextweek.getMinutes()) + GetAMPM(nextweek.getHours()) + "<br>"); 


// for each item in the dates array 
  for ( i=0 ; i<dates.length ; i++ ) { 
    var newdate = new Date(dates[i]); 

// watch out for the New Year 
    if ( annual[i] == "A" ) { 
      if (( newdate.getMonth() == "0" ) && ( now.getMonth() == "11" )) newdate.setYear(now.getYear() + 1) 
      else newdate.setYear(now.getYear()); 
    } 


    if (( now < newdate ) && ( newdate < nextweek )) { 
      if ( annual[i] == "A" ) {
	flagtest(count);
	count++;
        document.write("<p class='soondate'>" + weekday[newdate.getDay()] + ", " + month[newdate.getMonth()] + " " + newdate.getDate() + GetSuffix(newdate.getDate()) + ", " + newdate.getFullYear() + "</p>");
      }
      else {
	flagtest(count);
	count++;
        document.write("<p class='soondate'>" + weekday[newdate.getDay()] + ", " + month[newdate.getMonth()] + " " + newdate.getDate() + GetSuffix(newdate.getDate()) + ", " + newdate.getFullYear() + ", " +  GetZero(newdate.getHours()) + ":" + GetZero(newdate.getMinutes()) + GetAMPM(newdate.getHours()) + "</p>");
      }
      if ( startyear[i] == "") { 
        document.write("<li class='soon'>" + events[i] + "</li>"); 
      } 
      else { 
        var years = ( now.getFullYear() - startyear[i] ); 
        if ( years > 9 ) { 
          var subs = String(years); 
          var subs = subs.substr(1,1); 
        } 
        else { 
          var subs = years; 
        } 
        var suff = GetSuffix(years); 
        var yr = "xx"; 
        var newyrs = years + suff; 
        var replacedevent = events[i].replace(yr, newyrs) 
        document.write("<li class='soon'>" + replacedevent + "</li>"); 
      } 
    } 
  } 

  if ( count > 0 ) {
    document.write("</fieldset>");
  }

// --> 
