/* Database for event list */
/* Last updated: 21 December 2009 */

// 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). Meetings commence at 2.00 pm.</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>. Meetings commence at 1.00 pm.</p>'
var brisMinfo = '<p>QLD (Brisbane) Chapter meetings held at <b><i>Toowong Library Meeting Room - 9 Sherwood Rd, Toowong</i></b>. Meetings commence at 2.00 pm.</p>'

var sydMeeting_db = new Array (
'Sunday 6 February 2011',
'<b>Weapons of the Spirit</b> - a film about French Protestants saving Jewish refugees in WW2',

'Sunday 1 May 2011',
'AGM<br><b>Andr&eacute; Chamson - A leading figure in French Protestantism</b> - <i>Dennis Dyer</i>',

'June 2011',
'<b>Mid-Year Lunch</b> - details to be announced',

'Sunday 7 August 2011',
"<b>Up there Cazaly!</b> - A talk on the life and times of one of Australia's greatest sportsmen by <i>Robert Allen</i>",

'Saturday 3 September 2011',
'<b>Inaugural Australian Huguenot History conference</b> - at Scots Church, Margaret Street, Sydney. Enquiries to <a href=mailto:mrjuchau@bigpond.com>mrjuchau@bigpond.com</a>',

'Sunday 6 November 2011',
'<b>La Providence, the French Hospital: An Enduring Huguenot Institution</b> - <i>Robert Nash</i>'
)

var mlbMeeting_db = new Array (
'Saturday 26 March 2011',
'AGM<br><b>The Lansell family of Bendigo & East Kent</b> - <i>Beverley Carter</i>',

'May 2011',
'<b>Mid-Year social event</b> - details to be announced',

'Friday 21 October 2011',
'<b>Huguenot Lunch</b> - Malvernvale Hotel, Malvern 12 noon: contact <a href=mailto:carolinepiesse@netspace.net.au>Caroline Piesse</a>',

'Saturday 22 October 2011',
'<b>The Huguenot Galley Slaves: Martyrs for their Faith</b> - <i>Robert Nash</i>'
)

var brisMeeting_db = new Array (
'Sunday 27 February 2011',
'<b>"Check These Out!" A Virtual Tour workshop  of various Family History research sites</b> - <i>Sue Reid</i>',

'Sunday 29 May 2011',
'<b>Charles Chauvel: A pioneering Australian Filmmaker</b> - <i>Susanne Chauvel Carlsson</i>',

'Sunday 28 August 2011',
'<b>The Huguenot Galley Slaves: Martyrs for their Faith</b> - <i>Robert Nash</i>',

'Sunday 27 November 2011',
'AGM<br><b>The Huguenot Kitchen: 17th Century Cuisine</b> - <i>Gary Couchman</i>'
)

// 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>'

  // 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+
  }
}

