xml code:
<Window Id="WndSearch" Version="1">
<Position Width="400" Height="150"/>
<ChildTmpl>
This is just after your commented out original search window. You don't close <ChildTmpl>. After changing this to <ChildTmpl/> the script works for me.
Just out of curiosity, are you sure you want a child window and not a modal one? A child window gets placed on the parent form, whereas a modal window is a seperate window that has to be closed before you can do anything further on the parent window. The way your code and xml currently works (as a child window) is that the search textbox & label get hidden behind the browser object and are thus inaccessible (see attached pic)