I visit a lot of web sites with search functions, some of which work, but
not as well as Google's search. Google can be directed to search a
single site, on their advanced page, but you can save a step by running
this script (from the Apple script menu or, better, from the free
FastScripts Lite), with the site you want to search already in your browser.
Change the browser name in the second line if you want (your default
browser should be changed in program settings to match):
property searchText : ""
tell application "Safari" to set rawURL to URL of document 1
set url1 to text 8 thru length of rawURL
if url1 contains "/" then
set offset1 to offset of "/" in url1
set thisURL to text 1 thru (offset1 - 1) of url1
set thisURL to rawURL
set searchText to text returned of (display dialog "Search "" & ¬
thisURL & "" via Google for:" default answer searchText)
open location "http://www.google.com/search?&rls=en&q="
searchText & "+site:" & thisURL