So here's what I've come up with so far. Now I just need to figure out how to use the enter key as well as the mouse click.
<!doctype html>
<html lang="en">
<head>
<script>
function customSearch(inputId,type,site,scope) {
var searchUrl = site + '/_layouts/OSSSearchResults.aspx?';
<!-- // Or '/_layouts/SearchResults.aspx?' -->
var searchTerm = '&k=' + document.getElementById(inputId).value;
var listParams = '&cs=This%20' + type + '&u=' + scope; window.location.href = searchUrl + searchTerm + listParams;
}
function searchKeyPress(buttonId,e) {
<!-- // look for window.event in case event isn't passed in -->
if (window.event) {
e = window.event;
}
if (e.keyCode == 13) {
document.getElementById(buttonId).click();
}
} </script>
</head>
<body>
<input name="searchBox1" id="searchBox1" onkeypress="searchKeyPress('searchButton1',event);" type="text"/>
<input name="searchButton1" id="searchButton1" onclick="customSearch( 'searchBox1', 'Site', 'RegEng', 'RegEng' );" type="button" value="Search"/>
</body>
</html>