currentPage = 0

function PrintLastModDate() {
	monthNames = new Array(12)
	monthNames[0] = "jan"
	monthNames[1] = "feb"
	monthNames[2] = "mar"
	monthNames[3] = "apr"
	monthNames[4] = "may"
	monthNames[5] = "jun"
	monthNames[6] = "jul"
	monthNames[7] = "aug"
	monthNames[8] = "sep"
	monthNames[9] = "oct"
	monthNames[10] = "nov"
	monthNames[11] = "dec"
	docDate = new Date(document.lastModified)
	theMonth = monthNames[docDate.getMonth()]
	theDate = docDate.getDate()
	theDate = (theDate < 10) ? '0' + theDate : theDate;
	fullYear = new String(docDate.getYear())
	theYear = new String(fullYear.substring(2,4))
	theYear = (theYear < 10) ? '0' + theYear : theYear;
	document.write(theDate + theMonth + theYear)
}

function PrintStarmapHeader(fileLabel, categoryLabel) {
	document.writeln("PROJECT RHO " + fileLabel + "<br>")
	document.writeln("Ultraviolet Clearance<br>")
	document.writeln("Eyes Only<br>")
	document.writeln("Category " + categoryLabel + "<br>")
//	document.writeln("&copy;2002 Winchell Chung Jr<br>")
	document.writeln("Last modified:")
	PrintLastModDate()
	document.writeln("<br>")
}

function PrintStarmapPageNum() {
	printPage = currentPage + 1
	document.write("page " + printPage + " of " + starmapPages.length + "<br>")
}

function PrintStarmapNavMenu() {
	document.write("<FORM name=\"guideform\">")
	PrintStarmapUp()
	document.writeln("<br>")
	if (currentPage-1 >= 0)
		document.writeln("<a href=\"javascript:PrevPage()\"><img src=\"prevstar.gif\" width=34 height=23 border=0 alt=\"Prev\"></a>");
	document.writeln("<SELECT name=\"guidelinks\" onChange=\"window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value\">")
	document.writeln("<OPTION SELECTED value=\"javascript:void(0)\">--Choose--")
	for (i = 0; i < starmapPages.length; i++) {
		document.writeln("<OPTION value=\"" + starmapPages[i] + "\">" + starmapPageTitles[i])
	}
	document.writeln("</SELECT>")
	if (currentPage+1 < starmapPages.length)
		document.writeln("<a href=\"javascript:NextPage()\"><img src=\"nextstar.gif\" width=34 height=23 border=0 alt=\"Next\"></a>");
	document.writeln("</FORM>")
}

function RegisterStarmapPage(pageName) {
	for (i = 0; i < starmapPages.length; i++) {
		if (starmapPages[i] == pageName)
			currentPage = i;
	}
}

function NextPage() {
	if (currentPage+1 < starmapPages.length)
		window.location = starmapPages[currentPage+1]
		
}

function PrevPage() {
	if (currentPage-1 >= 0)
		window.location = starmapPages[currentPage-1]
}

function PrintStarmapTOC() {
	document.writeln("<UL>");
	for (i = 1; i < starmapPages.length; i++) {
		document.writeln("<LI><A href=\"" + starmapPages[i] + "\"><strong>" + starmapPageTitles[i] + "</strong></a>");
	}
	document.writeln("</UL>");
}
