// Added extra January at the end of the array.  Cheesy, but works :)
// Meeting dates will have to be updated before January meeting
var meetingDates = new Array()
meetingDates[0] =  "9"
meetingDates[1] =  "13"
meetingDates[2] =  "13"
meetingDates[3] =  "10"
meetingDates[4] =  "8"
meetingDates[5] =  "12"
meetingDates[6] =  "10"
meetingDates[7] =  "14"
meetingDates[8] =  "11"
meetingDates[9] =  "9"
meetingDates[10] =  "13"
meetingDates[11] =  "11"
meetingDates[12] =  "8"
var months = new Array()
months[0] = "January"
months[1] = "February"
months[2] = "March"
months[3] = "April"
months[4] = "May"
months[5] = "June"
months[6] = "July"
months[7] = "August"
months[8] = "September"
months[9] = "October"
months[10] = "November"
months[11] = "December"
months[12] = "January"

function NextMeetingDate()
{
  var currentDate = new Date();
  var month = currentDate.getMonth();
  var day = currentDate.getDate();
  if (day > meetingDates[month]) month++;
  
  document.write('Next meeting: ' + months[month] + ', ' + meetingDates[month] + 'th 2010');
}

var theImages = new Array()
theImages[0] = 'images/headers/h1.jpg'
theImages[1] = 'images/headers/h2.jpg'
theImages[2] = 'images/headers/h3.jpg'
theImages[3] = 'images/headers/h4.jpg'
theImages[4] = 'images/headers/h5.jpg'
theImages[5] = 'images/headers/h6.jpg'

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++)
{
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage()
{
  document.write('<img src="'+theImages[whichImage]+'">');
}
