var last_page_num = 28;
var even_number_pictures = "true";

var heading = "<table width='95%' align='center' border='0'> <tr> <td height='59' valign='top'><div align='center'><img src='images/heading.jpg' alt='2002 National Conference on Environmental Science and Technology'> </div></td></tr></table>";

// Beginning of table for photographs
var photos_heading = "<table width='95%' align='center' border='0'><tr>"

// Picture
var photos1 = "<td height='59' valign='top'><div align='center'><img src=' " + pic1_name + " ' alt='2002 National Conference on Environmental Science and Technology'></td>";

// Picture #2
var photos2 = "<td height='59' valign='top'><div align='center'><img src=' " + pic2_name + " ' alt='2002 National Conference on Environmental Science and Technology'></td>";


// End of table for photographs
var photos_footer = "</tr></table>";

var photos = photos_heading + photos1 + photos2 + photos_footer;

var menu_heading = "<table border='0'><tr>";
var menu_prev = "<td width='283'><div align='center'><font size='2' face='Arial'><< <a href='javascript:location.href=prev_page_name'>Previous Page</a> >></font></div></td>";
var menu_home = "<td width='184'><div align='center'><font face='Arial' size='2'><< <a href='index.html'>Photo Gallery Home</a>>></font></td>";
var menu_next = "<td width='228'><div align='center'><font face='Arial' size='2'><< <a href='javascript:location.href=next_page_name'>Next Page</a> >></font></div></td>" ;
var menu_footer = "</tr> </table>";
var menu_placeholder;

// Display the "Next" link only if we are not displaying the last page.
if (last_page_num != curr_page_num)
	document.write ("<body topmargin='0'>" + heading + photos + "<br>" + menu_heading + menu_prev + menu_home + menu_next + menu_footer + "</body>");
else {
// We execute the else block only if we are on the last page.  If we are on the last page, we need to
// determine whether we have an even number of pictures.  If we do, by the time we're on the last page,
// we only have one picture left and we need to adjust the page display accordingly.
	if (even_number_pictures == "true");
		photos = photos_heading + photos1 + photos_footer;
	menu_prev = "<td width='331'><div align='center'><font size='2' face='Arial'><< <a href='javascript:location.href=prev_page_name'>Previous Page</a> >></font></div></td>";
	menu_placeholder = "<td width='90'><div align='center'></td>";
	menu_home = "<td width='289'><div align='center'><font face='Arial' size='2'><< <a href='index.html'>Photo Gallery Home</a>>></font></td>";
	document.write ("<body topmargin='0'>" + heading + photos + "<br>" + menu_heading + menu_prev + menu_placeholder + menu_home + menu_footer + "</body>");	
	}
