I need to have 2 modal dialog popup on Sharepoint site opening, but a problem is that you can have only one opened at a time, and the last opened wins closing opened before. So I thought that I need to open the second Modal Dialog only after the first one is closed by a user. I thought of something like fireing a OnClose event, that would call the second window, but have no idea how to do it. Please advice how can this be done.
Assuming this is 2013 (since there is no version noted)... You can have a dialog box open from another dialog box. That automatically closes the first one (technically, what I believe that it does, actually, is call the application page in question from within the frame of the original modal dialog; this would explain why you don't get behaviors such as auto-postbacks on that transition).
If you really need to actually fire it on the closing of the first box, you should just be able to call it from your callback function. See the signature here:
SP.UI.ModalDialog.commonModalDialogOpen(url, options, callback, null);