/* create a header for the "content" division */

// get the currently displayed webpage
var currentPage   = currentPage();

//var currentTopic = currentTopic(currentPage);

// get the image names
var headerImages  = getHeaderImages();

// get the names of the webpages
var pageFilenames = getPageFilenames();

// print some text at top
//document.write('<h1>Erin and James</h1>');
//document.write('<h2>See you in Mystic!</h2>');
//document.write('<h1>James Battat</h1>');
//document.write('<h2>'+currentTopic+'</h2>');
document.write('<br>');

// by default use the first image
var image=headerImages[0];

// match the image with the webpage
for (ii=0; ii<pageFilenames.length; ii++) {
    // display the relevant image
    if (pageFilenames[ii]==currentPage) {
	image=headerImages[ii];
    }
}

document.write('<img src="img/'+image+'" alt="image example" width=490/>');
