function key_pressed(e){ var keynum = (window.event) ? e.keyCode : e.which; return keynum; }