Friends, thanks for the replies.
I js in full 0, this will not be able to convert a stack of popups, or anything else.
I'm interested in, as in the line from the above js file (here it is: https://jsfiddle.net/sbfLt5ga/1/
in place zIndex implement some function type, zIndex:zIndex+1, such that each new program had its own z-index.
Or you may want each popup to somehow assign an id or class (ATU now there's just a div without anything)
And thank you again.