You cannot write a javascript function to refresh parent page from a Modal child pop-up window.
Instead, you can put the code to refresh the page just below the line that actually opens the modal popup in the parent page. Since code exceution on parent stops at the point when the modal pop window is opened, the next line is executed only after the modal popup has been closed. So if you put the reload call just below the call to open modal popup, the parent would refresh immediately the modal popup is closed.
Example - To refresh
parent page on closing Modal child pop-up window.
....on Parent page
function OpenModalPopUP()
{
window.showModalDialog('page.aspx');
window.location.reload();
}