Thanks.
To Clarify more - This is not a pop up detection within application.
I need to control invoking of main url through different sources.
User A has invoked application
http://myapp.mycom.org by typing url at browser. He is working with Data entry for item A. Now he needs to find out how much insurance is covered for A. He uses another application to find out for A. And that application has link to myapp. he clicks on that link that will invoke login page for myapp. This way he will loose all the work he was doing on item A.
What I am looking for is to use history, or cookie or some javascript to detect if there is any browser window for that application is still active on desktop.