﻿function replaceOnKeyPress() {
    try {
        var browser = navigator.appName;
        if (browser == "Netscape") {
            var myid = 'ctl00_SearchBox_S6F789EBA_InputKeywords';
            var mysubmitid = 'S6F789EBA';
            var theFunction = mysubmitid + "_Submit();";
            var theInputID = myid;

            var txt = document.getElementById(theInputID);

            if (txt) {
                txt.onkeypress = function(e) {
                    var key = String.fromCharCode(e.keyCode);

                    if (key == "\n" || key == "\r") {
                        eval(theFunction);
                        return false;
                    }
                }
            }
        }
    }
    catch (e) { }
}
replaceOnKeyPress(); 