/**
 */
 
function totopbottom() {
	if (document.body.scrollTop == 0) {
		window.scrollTo(0,document.body.scrollHeight);
	} else {
		window.scrollTo(0,0);
	}
}
function topbottom() {
	document.body.ondblclick = totopbottom;
}

topbottom();
totopbottom();

_dom=0;
strs="";

function keypresshandler(e){
  if(document.all) e=window.event; // for IE
  if(_dom==3) var EventStatus = e.srcElement.tagName;
  else if(_dom==1) var EventStatus = e.target.nodeName; // for Mozilla

  if(EventStatus == 'INPUT' || EventStatus == 'TEXTAREA' || _dom == 2) return;

  var cc = '';
  var ch = '';

  if(_dom==3) {                   // for IE
    if(e.keyCode>0) {
      ch=String.fromCharCode(e.keyCode);
      cc=e.keyCode;
    }
  } else {                       // for Mozilla
    cc=(e.keyCode);
    if(e.charCode>0) {
      ch=String.fromCharCode(e.charCode);
    }
  }

  if(e.altKey || e.ctrlKey) return;

  if(ch == 'f' || ch == 'F') {
    self.location = './';
  } else if(ch == 'm' || ch == 'M') {
    self.location = './';
  } else if(ch == 'q' || ch == 'Q') {
  	self.location = '.';
  } else if(ch == 'a' || ch == 'A') {
    self.location = './';
  } else if(ch == 'v' || ch == 'V') {
    self.location = './';
  } else if(ch == 'p' || ch == 'P') {
    self.location = './';
  } else if(ch == 'r' || ch == 'R') {
    self.location = './';
  } else if(ch == 'h' || ch == 'H') {
    self.location = './';
  } else if(ch == 's' || ch == 'S') {
    window.scrollTo(0,0);
  } else if(ch == 'e' || ch == 'E') {
    window.scrollTo(0,document.body.scrollHeight);
  } else if(ch == 'b' || ch == 'B') {
    history.go(-1);
	}

  return;
}

function input(){
	_dom=document.all ? 3 : (document.getElementById ? 1 : (document.layers ? 2 : 0));
	document.onkeypress = keypresshandler;
}

input();
<!--Á¡¼±¾Èº¸ÀÌ±â ½ºÅ©¸³Æ®-->
<!--
    function allblur() {
         for (i = 0; i < document.links.length; i++)
              document.links[i].onfocus = document.links[i].blur;
    }
//-->
<!--Á¡¼±¾Èº¸ÀÌ±â ½ºÅ©¸³Æ®-->

