  var Now = new Date();

  var IndoorEvents = new Array(5);

  IndoorEvents[0] = new Array(2);
  IndoorEvents[0][0] = "October 12, 2011 20:00:00";
  IndoorEvents[0][1] = "Wed 12 Oct: Andy Swash: Ethiopia";
  IndoorEvents[1] = new Array(2);
  IndoorEvents[1][0] = "October 26, 2011 20:00:00";
  IndoorEvents[1][1] = "Wed 26 Oct: Chris Gooddie: The Jewel Hunter";
  IndoorEvents[2] = new Array(2);
  IndoorEvents[2][0] = "November 9, 2011 20:00:00";
  IndoorEvents[2][1] = "Wed 9 Nov: Marek Borkowski: Wildlife of Poland";
  IndoorEvents[3] = new Array(2);
  IndoorEvents[3][0] = "November 23, 2011 20:00:00";
  IndoorEvents[3][1] = "Wed 23 Nov: Dickie Duckett: AGM followed by 'More travels of Dickie Duckett'";
  IndoorEvents[4] = new Array(2);
  IndoorEvents[4][0] = "December 7, 2011 20:00:00";
  IndoorEvents[4][1] = "Wed 7 Dec: Stephen Moss: The origin of bird names";
  IndoorEvents[5] = new Array(2);
  IndoorEvents[5][0] = "December 14, 2011 20:00:00";
  IndoorEvents[5][1] = "Wed 14 Dec: Christmas Social";
  IndoorEvents[6] = new Array(2);
  IndoorEvents[6][0] = "January 4, 2012 20:00:00";
  IndoorEvents[6][1] = "Wed 4 Jan: Nik Borrow: Fakes and Fakery in the Birding World";
  IndoorEvents[7] = new Array(2);
  IndoorEvents[7][0] = "January 12, 2012 13:00:00";
  IndoorEvents[7][1] = "Thur 12 Jan: Colin Wilson: Tufted Ducks and their cousins (Reading Museum)";
  IndoorEvents[8] = new Array(2);
  IndoorEvents[8][0] = "January 18, 2012 20:00:00";
  IndoorEvents[8][1] = "Wed 18 Jan: Debby Reynolds: Birding in the Caucasus";
  IndoorEvents[9] = new Array(2);
  IndoorEvents[9][0] = "February 1, 2012 20:00:00";
  IndoorEvents[9][1] = "Wed 1 Feb: Andrew Cleave: Lundy";
  IndoorEvents[10] = new Array(2);
  IndoorEvents[10][0] = "February 15, 2012 20:00:00";
  IndoorEvents[10][1] = "Wed 15 Feb: Members' Magazine Evening";
  IndoorEvents[11] = new Array(2);
  IndoorEvents[11][0] = "February 25, 2012 20:00:00";
  IndoorEvents[11][1] = "Sat 25 Feb: Birders' Day at Reading Museum";
  IndoorEvents[12] = new Array(2);
  IndoorEvents[12][0] = "February 29, 2012 20:00:00";
  IndoorEvents[12][1] = "Wed 29 Feb: Ken White: Birding the Straits of Gibraltar";
  IndoorEvents[13] = new Array(2);
  IndoorEvents[13][0] = "March 14, 2012 20:00:00";
  IndoorEvents[13][1] = "Wed 14 Mar: Annual Photographic Competition";
  IndoorEvents[14] = new Array(2);
  IndoorEvents[14][0] = "March 28, 2012 20:00:00";
  IndoorEvents[14][1] = "Wed 28 Mar: Colin Wilson: Spring Chorus in Reading (Reading Museum)";
  IndoorEvents[15] = new Array(2);
  IndoorEvents[15][0] = "March 28, 2012 20:00:00";
  IndoorEvents[15][1] = "Wed 28 Mar: Ken Norris: Tropical Bird Ecology";
  IndoorEvents[16] = new Array(2);
  IndoorEvents[16][0] = "April 18, 2012 20:00:00";
  IndoorEvents[16][1] = "Wed 18 Apr: Bird ID Workshop - Wildfowl";

  var OutdoorEvents = new Array(5);

  OutdoorEvents[0] = new Array(2);
  OutdoorEvents[0][0] = "August 20, 2011 20:00:00";
  OutdoorEvents[0][1] = "Sat 20 Aug: Bird Fair at Rutland Water (Full day coach trip)";
  OutdoorEvents[1] = new Array(2);
  OutdoorEvents[1][0] = "September 10, 2011 20:00:00";
  OutdoorEvents[1][1] = "Sat 10 Sep: RSPB Titchwell, Norfolk (Full day coach trip with East Berks RSPB)";
  OutdoorEvents[2] = new Array(2);
  OutdoorEvents[2][0] = "September 15, 2011 20:00:00";
  OutdoorEvents[2][1] = "Thu 15 Sep: Titchfield Haven, Hampshire (Full day or morning only)";
  OutdoorEvents[3] = new Array(2);
  OutdoorEvents[3][0] = "October 6, 2011 20:00:00";
  OutdoorEvents[3][1] = "Thu 6 Oct - Sun 9 Oct: Cornwall (Long weekend)";
  OutdoorEvents[4] = new Array(2);
  OutdoorEvents[4][0] = "October 20, 2011 20:00:00";
  OutdoorEvents[4][1] = "Thu 20 Oct: Borough Marsh, Charvil, Berkshire";
  OutdoorEvents[5] = new Array(2);
  OutdoorEvents[5][0] = "October 22, 2011 20:00:00";
  OutdoorEvents[5][1] = "Sat 22 Oct: Oare Marshes, Kent (Full day)";
  OutdoorEvents[6] = new Array(2);
  OutdoorEvents[6][0] = "November 13, 2011 20:00:00";
  OutdoorEvents[6][1] = "Sun 13 Nov: Farlington Marshes, Hampshire (Whole day or morning only)";
  OutdoorEvents[7] = new Array(2);
  OutdoorEvents[7][0] = "November 17, 2011 20:00:00";
  OutdoorEvents[7][1] = "Thu 17 Nov: Staines Moor & Church Lammas, Spelthorne";
  OutdoorEvents[8] = new Array(2);
  OutdoorEvents[8][0] = "December 4, 2011 20:00:00";
  OutdoorEvents[8][1] = "Sun 4 Dec: Blashford Lakes & New Forest (Full day)";
  OutdoorEvents[9] = new Array(2);
  OutdoorEvents[9][0] = "December 15, 2011 20:00:00";
  OutdoorEvents[9][1] = "Thu 15 Dec: Henley Road GPs, Caversham";
  OutdoorEvents[10] = new Array(2);
  OutdoorEvents[10][0] = "January 15, 2012 20:00:00";
  OutdoorEvents[10][1] = "Sun 15 Jan: Ouse Washes RSPB, Cambridgeshire (Full day coach trip)";
  OutdoorEvents[11] = new Array(2);
  OutdoorEvents[11][0] = "January 19, 2012 20:00:00";
  OutdoorEvents[11][1] = "Thu 19 Jan: Dinton Pastures Country Park, Berkshire";
  OutdoorEvents[12] = new Array(2);
  OutdoorEvents[12][0] = "January 22, 2012 20:00:00";
  OutdoorEvents[12][1] = "Sun 22 Jan: Isle of Sheppey, Kent (Full day)";
  OutdoorEvents[13] = new Array(2);
  OutdoorEvents[13][0] = "February 5, 2012 20:00:00";
  OutdoorEvents[13][1] = "Sun 5 Feb: Dungeness RSPB (Full day coach trip)";
  OutdoorEvents[14] = new Array(2);
  OutdoorEvents[14][0] = "February 9, 2012 20:00:00";
  OutdoorEvents[14][1] = "Thu 9 Feb: Churn, Berkshire";
  OutdoorEvents[15] = new Array(2);
  OutdoorEvents[15][0] = "February 11, 2012 20:00:00";
  OutdoorEvents[15][1] = "Sat 11 to Thu 16 Apr: Extremadura, Spain";
  OutdoorEvents[16] = new Array(2);
  OutdoorEvents[16][0] = "February 16, 2012 20:00:00";
  OutdoorEvents[16][1] = "Thu 16 to Sun 19 Feb: North Norfolk Weekend Trip";
  OutdoorEvents[17] = new Array(2);
  OutdoorEvents[17][0] = "February 23, 2012 20:00:00";
  OutdoorEvents[17][1] = "Thu 23 Feb: Tufted Ducks, Dinton Pastures";
  OutdoorEvents[18] = new Array(2);
  OutdoorEvents[18][0] = "March 15, 2012 20:00:00";
  OutdoorEvents[18][1] = "Thu 15 Mar: Twyford Gravel Pits, Berkshire";
  OutdoorEvents[19] = new Array(2);
  OutdoorEvents[19][0] = "March 25, 2012 20:00:00";
  OutdoorEvents[19][1] = "Sun 25 Mar: Hook with Warsash, Hampshire (Full day)";
  OutdoorEvents[20] = new Array(2);
  OutdoorEvents[20][0] = "April 12, 2012 20:00:00";
  OutdoorEvents[20][1] = "Thu 12 to Wed 18 Apr: Andalucia, Spain";
  OutdoorEvents[21] = new Array(2);
  OutdoorEvents[21][0] = "April 19, 2012 20:00:00";
  OutdoorEvents[21][1] = "Thu 19 Apr: Spring Chorus, Dinton Pastures";
  OutdoorEvents[22] = new Array(2);
  OutdoorEvents[22][0] = "April 22, 2012 20:00:00";
  OutdoorEvents[22][1] = "Sun 22 Apr: New Forest, Hampshire  (Full day)";
  OutdoorEvents[23] = new Array(2);
  OutdoorEvents[23][0] = "April 26, 2012 20:00:00";
  OutdoorEvents[23][1] = "Thu 26 Apr: Searle’s Lane GPs, Berkshire";
  OutdoorEvents[24] = new Array(2);
  OutdoorEvents[24][0] = "May 5, 2012 20:00:00";
  OutdoorEvents[24][1] = "Sat 5 May: Otmoor RSPB (Half or full day)";
  OutdoorEvents[25] = new Array(2);
  OutdoorEvents[25][0] = "May 12, 2012 20:00:00";
  OutdoorEvents[25][1] = "Sat 12 May: Portland, Dorset (Full day coach trip run by East Berks RSPB)";
  OutdoorEvents[26] = new Array(2);
  OutdoorEvents[26][0] = "May 17, 2012 20:00:00";
  OutdoorEvents[26][1] = "Thu 17 May: Basildon Park, Berkshire";
  OutdoorEvents[27] = new Array(2);
  OutdoorEvents[27][0] = "May 25, 2012 20:00:00";
  OutdoorEvents[27][1] = "Fri 25 to Sun 27 May: Anglesey, Wales";
  OutdoorEvents[28] = new Array(2);
  OutdoorEvents[28][0] = "June 9, 2012 20:00:00";
  OutdoorEvents[28][1] = "Sat 9 Jun: Seabird cruise from Poole, Dorset (Afternoon and evening)";
  OutdoorEvents[29] = new Array(2);
  OutdoorEvents[29][0] = "Jun 15, 2012 20:00:00";
  OutdoorEvents[29][1] = "Thu 15 Jun: Padworth Common (Evening walk)";
  OutdoorEvents[30] = new Array(2);
  OutdoorEvents[30][0] = "August 18, 2012 20:00:00";
  OutdoorEvents[30][1] = "Sat 18 Aug: Bird Fair at Rutland Water (Full day coach trip)";


function GetNextOutdoorMeeting()
{
  var s = "";

  for(var i = 0; i < OutdoorEvents.length; i++)
  {
    EventDate = new Date(OutdoorEvents[i][0]);

    if (EventDate > Now)
    {
      s = OutdoorEvents[i][1];
      i = OutdoorEvents.length;
    }
  }

  if(s.length == 0) {
    s = "Awaiting new season programme.";
  }

  document.write(s);
}

function GetNextIndoorMeeting()
{
  var s = "";

  for(var i = 0; i < IndoorEvents.length; i++)
  {
    EventDate = new Date(IndoorEvents[i][0]);

    if (EventDate > Now)
    {
      s = IndoorEvents[i][1];
      i = IndoorEvents.length;
    }
  }

  if(s.length == 0) {
    s = "Awaiting new season programme.";
  }

  document.write(s);
}
