It doesn't really freeze, on selecting an option, the selc_window deactivates. In your code, add this at the end:
"selc_window.activate();" without the quotation marks
Thank you very much - it works perfectly.