Enter is not working in Internet explorer and Firefox
===

My this function is not working in Internet explorer and firefox. In firefox it returns error 
"**TypeError: e is undefined
[Break On This Error] 	
...e.which == "number") ? e.which : e.keyCode; keyCodeEntered = (e.which) ? e.which...**" 

  

    function onSearchPhraseKeyDown(e) {
                var buttonId = '<%=SearchButton.ClientID %>';
                if (!e) var e = (typeof e.which == "number") ? e.which : e.keyCode; keyCodeEntered = (e.which) ? e.which : window.event.keyCode;
        
                if ((keyCodeEntered == 13) || (keyCodeEntered == 13)) {
                    document.getElementById(buttonId).click();
                    return false;
                } else {
                    return true;
                }
            }

Can anybody fix it Please thankyou...!!!

