Sharepoint 2010 have a very good featuree of Modal dialog, Modal dialogs in sharepoint 2010 use the client library SP.UI.ModalDialog and showModalDialog

There come the requirement when you want to find the weather the modal dialog is opened or not and you want to modify certain style in modal dialog  from the parent page, this can be achieved by using  javascript  adding it to master page, where you can identify the window location and can create the javascript or style tag that can be add it to modal dialog while rendering.