Reworked the showModalDialog eval logic to parse the document HTML (I'm so sorry, mom)