/* Database for event list */
/* Last updated: 19 December 2008 */

// meetings
var sydMinfo = '<p>NSW (Sydney) Chapter meetings held at the <b><i>Dougherty Community Centre - 7 Victor St, Chatswood</i></b> (about 7-12 minutes walk from Chatswood Railway Station). All meetings commence at 2.00 pm. Afternoon tea will be served.</p>'
var mlbMinfo = '<p>VIC (Melbourne) Chapter meetings held at <b><i>GSV (Genealogical Society of Victoria) - Emirates Building Level B1, 257 Collins St, Melbourne</i></b>. All meetings commence at 1.00 pm. Afternoon tea will be served.</p>'
var brisMinfo = '<p>QLD (Brisbane) Chapter meetings held at <b><i>Toowong Library Meeting Room - 9 Sherwood Rd, Toowong</i></b>. All meetings commence at 2.00 pm. Afternoon tea will be served.</p>'

var sydMeeting_db = new Array (
'Sunday 1 February 2009',
'<b>Charity Schools of London</b> - <i>Pauline Kettle</i>',

'Sunday 15 March 2009',
'<b>Huguenot Church Service</b>, Campbell Street Presbyterian Church, Balmain, 2.30pm',

'Sunday 3 May 2009',
'AGM<br><b>John Calvin, the Man and his Work</b> - <i>David Duchesne</i>',

'Sunday 21 June 2009',
'<b>Lunch/Dinner</b> - details to be announced',

'Sunday 2 August 2009',
'<b>Psalms in the Forest, Blood on the Sand: The failed Huguenot Colony in Florida, 1564-5</b> - <i>Robert Nash</i>',

'Sunday 11 October 2009',
'<b>Huguenot Picnic:</b> venue to be announced',

'Sunday 1 November 2009',
'<b>Pierre Bayle and the Republic of Letters: Huguenot Intellectuals in 17th century Holland</b> - <i>Philippe Tanguy</i>',

'November 2009',
'<b>Lunch/Dinner</b> - venue and date to be advised'
)

var mlbMeeting_db = new Array (
'Saturday 28 March 2009',
'<b>Suzanne, David, Judith & Isaac...Given Names & Protestant Religious Identity in 18th century Paris</b> - <i>David Garrioch</i>',

'Saturday 2 May 2009',
"<b>Picnic</b> at 'The Briars' Mount Martha, (A Beckett family home)<br>contact <a href=mailto:carolinepiesse@netspace.net.au>Caroline Piesse</a>",

'Friday 23 October 2009',
'<b>Lunch</b> - venue & details to be announced: contact <a href=mailto:carolinepiesse@netspace.net.au>Caroline Piesse</a>',

'Saturday 24 October 2009',
'<b>How to do Huguenot Research - A Guide for Victorians</b> - <i>Robert Nash</i>'
)

var brisMeeting_db = new Array (
'Sunday 19 April 2009',
'<b>John Calvin, the Man and his Work</b> - <i>David Duchesne</i>',

'Sunday 28 June 2009',
'<b>Harold Cazneaux; An Australian Photographer</b> - <i>Gary Couchman</i>',

'Sunday 30 August 2009',
"<b>Silkweavers of Spitalfields - the Huguenots of London's East End</b> - <i>Robert Nash</i>",

'November 2009',
'<b>Picnic or Garden Party</b> - date to be announced'
)

// social events
// var socialEvent_db = new Array (
// 'Sat 13 May 2006',
// 'Dinner at La Goulue 17 Alexander St Crows Nest (Sydney)',

// 'Fri 28 Jul 2006',
// '(Dinner at Melbourne) Details and venue to be advised',

// 'Sat 11 Nov 2006',
// 'Dinner at La Goulue (Sydney)'
// )

/*
** External JavaScript 'eventlist.js'
** This script is exclusively for The Huguenot Society of Australia website
**
** Author:	Ken Namihira
** Version:	4.0
** Last Update: 04 Jun 2007
*/

/* A two dimension array contains 'Sydney meetings' */
sydMeeting = new Array

function sydMeetingObj () {
  this.date
  this.what
}

for (i = 0; i < sydMeeting_db.length / 2; i++) {
  sydMeeting[i] = new sydMeetingObj
  sydMeeting[i].date = sydMeeting_db[i * 2]
  sydMeeting[i].what = sydMeeting_db[i * 2 + 1]
}

/* A two dimension array contains 'Melbourne meetings' */
mlbMeeting = new Array

function mlbMeetingObj () {
  this.date
  this.what
}

for (i = 0; i < mlbMeeting_db.length / 2; i++) {
  mlbMeeting[i] = new mlbMeetingObj
  mlbMeeting[i].date = mlbMeeting_db[i * 2]
  mlbMeeting[i].what = mlbMeeting_db[i * 2 + 1]
}

/* A two dimension array contains 'Brisbane meetings' */
brisMeeting = new Array

function brisMeetingObj () {
  this.date
  this.what
}

for (i = 0; i < brisMeeting_db.length / 2; i++) {
  brisMeeting[i] = new brisMeetingObj
  brisMeeting[i].date = brisMeeting_db[i * 2]
  brisMeeting[i].what = brisMeeting_db[i * 2 + 1]
}

/* A two dimension array contains 'social events' */
// socialEvent = new Array

// function socialEventObj () {
//   this.date
//   this.what
// }

// for (i = 0; i < socialEvent_db.length / 2; i++) {
//   socialEvent[i] = new socialEventObj
//   socialEvent[i].date = socialEvent_db[i * 2]
//   socialEvent[i].what = socialEvent_db[i * 2 + 1]
// }

/* Writing html codes (event list) into a layer */
/* input:	objectID - layer ID */
function eventTables (objectID) {
  htmlStr = ''
  layerDom = findDOM (objectID, 0)

  // meetings heading
//   htmlStr = '<h2>Meetings</h2>'
   htmlStr = '<h3>[NEW] Announcement of <a href="tour.html">HUGUENOT TOUR OF FRANCE OCTOBER 2010</a></h3>'


  // Sydney meetings
  htmlStr = htmlStr + '<h2>Sydney Chapter Meetings & Activities</h2>'
  htmlStr = htmlStr + sydMinfo
  htmlStr = htmlStr + '<table width=98% border=0>'
  htmlStr = htmlStr + '<tr><th>Date</th><th>Topic(s)</th><tr>'

  for (i = 0; i < sydMeeting.length; i++) {
    htmlStr = htmlStr + '<tr><td>' + sydMeeting[i].date + '</td><td>' + sydMeeting[i].what + '</td></tr>'
  }

  htmlStr = htmlStr + '</table>'

  // Melbourne meetings
  htmlStr = htmlStr + '<h2>Melbourne Chapter Meetings & Activities</h2>'
  htmlStr = htmlStr + mlbMinfo
  htmlStr = htmlStr + '<table width=98% border=0>'
  htmlStr = htmlStr + '<tr><th>Date</th><th>Topic(s)</th><tr>'

  for (i = 0; i < mlbMeeting.length; i++) {
    htmlStr = htmlStr + '<tr><td>' + mlbMeeting[i].date + '</td><td>' + mlbMeeting[i].what + '</td></tr>'
  }

  htmlStr = htmlStr + '</table>'

  // Brisbane meetings
  htmlStr = htmlStr + '<h2>Brisbane Chapter Meetings and Activities</h2>'
  htmlStr = htmlStr + brisMinfo
  htmlStr = htmlStr + '<table width=98% border=0>'
  htmlStr = htmlStr + '<tr><th>Date</th><th>Topic(s)</th><tr>'

  for (i = 0; i < brisMeeting.length; i++) {
    htmlStr = htmlStr + '<tr><td>' + brisMeeting[i].date + '</td><td>' + brisMeeting[i].what + '</td></tr>'
  }

  htmlStr = htmlStr + '</table>'

  // social events
//   htmlStr = htmlStr + '<h2>Social Events (Sydney & Melbourne)</h2>'
//   htmlStr = htmlStr + '<p>Booking and payment required in advance. Meet at 7.00 pm</p>'
//   htmlStr = htmlStr + '<table width=98% border=0>'
//   htmlStr = htmlStr + '<tr><th>Date</th><th>Event</th><tr>'

//   for (i = 0; i < socialEvent.length; i++) {
//     htmlStr = htmlStr + '<tr><td>' + socialEvent[i].date + '</td><td>' + socialEvent[i].what + '</td></tr>'
//   }

//   htmlStr = htmlStr + '</table>'

  if (document.layers) {
    newWindow = window.open ('', 'eventList', 'scrollbars=yes, toolbar=yes')	// creating new window
    newWindow.setResizable(true)						// because NS4 doesn't
    newWindow.document.write (htmlStr)						// support innerHTML property
  }
  else {
    layerDom.innerHTML = htmlStr						// IE & NS6+
  }
}
