var hotKeys = new Array('x');
var urls = new Array('javascript:closebox();');
function loadAnchors () {
	var i,j;
	var anchors = document.getElementsByTagName('a');
	j = 1;
	// loop through all href looking for accesskey
	for(i = 0; i < anchors.length; i++) {
		if (anchors[i].accessKey) { 
			hotKeys[j] = anchors[i].accessKey;
			urls[j] = anchors[i].href;
		j++;
		}
	}
}
if (document.layers) {
	document.captureEvents(Event.KEYPRESS)
}

function navigate(e) {
	var enteredKey;
	var arrayKey;
	
	if (document.layers)
		enteredKey = String.fromCharCode(e.which);
	else if (document.all) {
		enteredKey = String.fromCharCode(event.keyCode);
	}
	else
		enteredKey = String.fromCharCode(e.which);	 	
  
	enteredKey = enteredKey.toLowerCase()
	
	for(i = 0, n = hotKeys.length; i < n; i++) {
		arrayKey = hotKeys[i].toLowerCase();
		if (arrayKey == enteredKey) {
			window.location=urls[i];
			return(true);
		}
	}
	return(true);
}
document.onkeypress=navigate;
window.onload = loadAnchors;