/* Event Functions for PMI website.

Author: Brendan O'Connor
Date: December 20, 2003

Author: Ray Hope
Date: July 31, 2007

Updated: Chris Gumprich
Date: September 14, 2009
- updated to handle external URLs
*/

var eventDB = new Array()

function loadEventDB()
{
                               
eventDB[eventDB.length] = loadEvent( "2010/11/02", "2010/11/05",	"Nov 2-5"
																, ""
																, "", ""
																, "PMI Fall Workshops"
                                , ""
																, ""
                                , ""
																, ""
																, ""
                                , ""
																, "", "0", "",
                                "https://pmi.olasoft.com/viewUpcomingEvents.html");  
eventDB[eventDB.length] = loadEvent( "2010/06/01", "2010/06/01",	"Jun 1"
																, ""
																, "", ""
																, "June Chapter Meeting"
                                , ""
																, ""
                                , ""
																, ""
																, ""
                                , ""
																, "", "0", "",
                                "https://pmi.olasoft.com/viewEvent.html?no_header=true&productId=4848");  
                                
  return eventDB;
}

function loadEvent( aBeginDate, aEndDate, aDates, aTime, aLocation, aHeader, aTitle, aBody, aSpeaker, aBio, 
                    aRegistrationFees, aRegisterInstructions, aContactInfo, aDetailLink, aRegisterId, aRepNo,
                    aExternalURL)
{
  var oneRecord = new Object()
  oneRecord.aBeginDate = aBeginDate
  oneRecord.aEndDate = aEndDate
  oneRecord.aDates= aDates
  oneRecord.aTime= aTime                              // Setup as an array for creating bullets in the event details
  oneRecord.aLocation = aLocation
  oneRecord.aHeader= aHeader
  oneRecord.aTitle= aTitle
  oneRecord.aBody= aBody                              // Setup as an array for creating paragraphs in the event details
  oneRecord.aSpeaker = aSpeaker
  oneRecord.aBio = aBio
  oneRecord.aRegistrationFees = aRegistrationFees     // Setup as an array for creating bullets in the event details
  oneRecord.aRegisterInstructions = aRegisterInstructions
  oneRecord.aContactInfo = aContactInfo
  oneRecord.aDetailLink= aDetailLink
  oneRecord.aRegisterId= aRegisterId
  oneRecord.aRepNo = aRepNo
  //if (aExternalURL == undefined){
  //  oneRecord.aExternalURL = "none"
  //}
  //else {
    oneRecord.aExternalURL = aExternalURL
  //}
  return oneRecord
}
