function getKey(keyStroke) {

var browser = navigator.appName;

if (browser=='Netscape') {

	YourInput = keyStroke.which;
	if (YourInput==27) {
		document.location.href='http://www.google.com';
		}
	}
else {

	YourInput = event.keyCode;
	if (YourInput==27) {
		document.location.href='http://www.google.com';
		}
	}
}



document.onkeyup = getKey;