function generate_keyboard_navigation(prev_link, next_link) {
	Event.observe(window, 'load', function() {
		Event.observe(document, 'keyup', function(e) {
			if (!(e.altKey || e.ctrlKey || e.metaKey || e.shiftKey)) {
				switch (e.keyCode) {
					case 37:
						if (prev_link !== null) { document.location.href = prev_link; }
						break;
					case 39:
						if (next_link !== null) { document.location.href = next_link; }
						break;
				}
			}
		});
	
		["input", "select", "textarea"].each(function(type) {
			$$(type).each(function(element) {
				Event.observe(element, 'keyup', function(e) { Event.stop(e); });									 
			});
		});	
	});
}

