The small search control that is rendered in the default SharePoint pages is a delegate control rendered through master page. You can find it defined in the master page as follows:
<asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
<SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" />
This control is actually available through a feature called "OSearchBasicFeature" located under 12\TEMPLATE\FEATURES. In the feature elements file (in this feature it's called "SearchArea.xml"), you can see the following:
ControlAssembly="Microsoft.SharePoint.Portal, Version=220.127.116.11, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
The main class here seems to be Microsoft.SharePoint.Portal.WebControls.SearchBoxEx. To customize small search, you need to inherit from "SearchBoxEx" class and override "CreateChildControls" method to get your custom small search rendered. Do not modify any out of the box files as they might lead you into an unsupported scenario. Instead, following are the simple steps to get the small search control customized:
This should do the tricky and you should be able to literally customizing anything within the small search control.
Happy customizing your SharePoint environment - and I really hope this post was helpful! Look around for things like this in SharePoint as there are plenty of "hacks" to get things done!!!