/**
 * Javascript to trap for the enter key.
 *
 * $Horde: horde/js/enter_key_trap.js,v 1.2.10.2 2005/10/18 11:33:38 jan Exp $
 *
 * See the enclosed file COPYING for license information (LGPL). If you did not
 * receive this file, see http://www.fsf.org/copyleft/lgpl.html.
 */

function enter_key_trap(e)
{
    var e = e || window.event;

    if (e.keyCode) {
        key = e.keyCode;
	} else if (e.which) {
        key = e.which;
    }

    return (key == 10 || key == 13);
}
