// 2008-04-17 - Scott Price
// Method required by Internet Explorer to call a button's on click as a result of
// the user pressing the Enter/Return key in a text box on the form.
function doSearch(SearchControlInst,e)
{
    var keyPressed;

    if(window.event)
        // Internet Explorer
        keyPressed = window.event.keyCode;
    else
        // Netscape/Firefox/Gecko/Mozilla Based Browser Controls
        keyPressed = e.which;

    if (keyPressed == 13)
    {
        // call the postback for the control
        //__doPostBack(SearchControlInst, '');
        
        // Get the control by name
        var b = document.getElementById(SearchControlInst);
        if (b != null)
        {
            // If we have the control, try to call it's click
            b.click();
            event.keyCode = 0
        }
    }
}