Hi. Perhaps you could dynamically create the search form and among the input tags of type hidden use the following:
Code:
<input type='hidden' name='site' value='NUMBER'/>
<input type='hidden' name='path' value='REL/PATH/'/>
<input type='hidden' name='refine' value='1'/>
Depending on what page a user in on, dynamicaly replace NUMBER with the site number, dynamically replace REL/PATH/ with the relative path to a department, and keep the refine hidden tag with value one unchanged. The NUMBER can be found in the site_id column of the sites table.