function presentationBlank()
{
  window.status = "Blank!"
}

function presentationNext()
{
  document.location=pageNumber + 2 + ".html"
}

function presentationPrevious()
{
  if ( pageNumber > 0 ) {
    document.location=pageNumber + ".html"
  }
}

function presentationStart()
{
  document.location="1.html"
}

function bodyKeyPress(e)
{
  e = e ? e : window.event

  if ( e.which > 0 ) {
    window.status = String.fromCharCode(e.which)
    switch ( String.fromCharCode(e.which) )
    {
    case 'b':
      presentationBlank()
      return false
    case ' ':
    case '+':
    case '>':
      presentationNext()
      return false
    case '-':
    case '<':
      presentationPrevious()
      return false
    case 'p':
      presentationStart()
      return false
    default:
    }
    return true
  }
  else if ( e.keyCode > 0 ) {
    window.status = e.keyCode
    switch ( e.keyCode ) {
    case 116:
      presentationStart()
      return false
    case 39:
      presentationNext()
      return false
    case 37:
    case 22:
      presentationPrevious()
      return false
    default:
      window.status = e.keyCode
    }
    return true
  }
}
