redBack = new Image()
redTop = new Image()
redFwd = new Image()
blueBack = new Image()
blueTop = new Image()
blueFwd = new Image()
	
redBack.src = "images/red_bak.gif"
redTop.src = "images/red_top.gif"
redFwd.src = "images/red_fwd.gif"
blueBack.src = "images/blue_bak.gif"
blueTop.src = "images/blue_top.gif"
blueFwd.src = "images/blue_fwd.gif"

document.onkeydown = nextPt

pageLoc = document.location.href.indexOf(".html")
currPg = document.location.href.substring(pageLoc-2,pageLoc)
var currPt = 0
var maxPt = 6

if (document.all) {
	var docObj = "document.all."
	var styleObj = ".style"
}
else {
	var docObj = "document."
	var styleObj = ""
}

function nextPt(evt) {
	if (currPt >= maxPt || evt.which != 29) {
		document.location = "class" + thePage(evt.which) + ".html"
	}
	else {
		currPt++
		thisPt = eval(docObj + "pt" + currPt + styleObj)
		thisPt.visibility = "visible"
	}
	return false
}

function thePage(direction) {
	if (direction == 28)
		currPg--
	if (direction == 29)
		currPg++
	if (direction == 30)
		currPg = 1
	if (currPg < 10)
		return "0" + parseInt(currPg)
	return currPg
}

