Thank you, Alex and reflexactions! Your advices helped to move forward I can create popups and set focus without a problem. But there is another thing - I have to return focus correctly to the first popup window after second & third popups closed in one click.
Cheers, Dmitri.