// sets up the html content to insert

var navPage=window.location.search; //window.location.search
navPage=parseInt(navPage.substring(1,navPage.length))
var nextPage = navPage + 1
var prevPage = navPage - 1
var numPages = 113

function goPage(pageSelect){
	if(pageSelect != "none"){
		location.href = 'mom_script' + pageSelect + '.html?' + pageSelect
	}
} //end goPage


document.writeln('<FORM>')
document.writeln('<FONT FACE="Courier New" SIZE="2"><DIV ALIGN="CENTER">')
document.writeln('<A HREF="../index.html">Return to <I>Man on the Moon</I> Home</A><BR>')
document.writeln('<A HREF="../script.html">Introduction</A>')
document.writeln('&nbsp;&nbsp;&nbsp;&nbsp;')

// if we are not at the first page, then write a previous button
if (prevPage > 0) {
	document.writeln('<A HREF="mom_script' + prevPage + '.html?' + prevPage + '">&lt;-previous page</A>')
	document.writeln('&nbsp;&nbsp;&nbsp;&nbsp;')
}

// if we are not at the first page, then write a previous button
if (nextPage <= numPages) {
	document.writeln('<A HREF="mom_script' + nextPage + '.html?' + nextPage + '">next page-&gt;</A>')
	document.writeln('&nbsp;&nbsp;&nbsp;&nbsp;')
}

// build the jump to selector
document.writeln('jump to page:')
document.writeln('<SELECT NAME="RegionSelect" onChange="goPage(RegionSelect[RegionSelect.selectedIndex].value);">')
document.writeln('<OPTION VALUE="none" SELECTED>Page#</OPTION>')
for (i=1; i <= numPages; i++) {
	document.writeln('<OPTION VALUE="' + i + '">' + i + '</OPTION>')
}
document.writeln('</SELECT>')

document.writeln('</DIV></FONT>')
document.writeln('<HR NOSHADE WIDTH="100%">')
document.writeln('</FORM>')

document.writeln('<B>Page ' + navPage + '</B><BR>')
