What you are trying to do with the secondary window? Can you share the SF-Tree and a printout, that I can see, what you want finally the Smartforms to do.
I'm not sure, if this is possible, what you are trying and I'm not sure, if I understand your problem at all
Regards
Florian