How to change page with Javascript for keyboard navigation?

You need a document.location:

function checkKeycode(e)
{
  var keycode;

  if (window.event)
    keycode = window.event.keyCode;
  else
    if (e) keycode = e.which;

  switch (keycode)
  {
    case 37:  // left arrow
      document.location = "page1.htm";
    break;

    case 39:  // right arrow
      document.location = "page3.htm";
    break;
  }
}