The window with rubyonrails.org in it has a close callback to prevent closing. That's why you cannot close it. Check out the code to see how to do it.
Open a confirm dialog, an alert dialog or an info dialog (with alert_lite.css)
Click here to open a modal window
Test select for IE
Click here to open a window with the div below at the exact same size and position
Close all windows (if it's possible)
 
Lorem ipsum dolor sit amet, consectetur adipiscing elit