Here's an iframe we access via the hostname foo.www.midwinter.com (which resolves to the same host as www.midwinter.com). It sets its domain to www.midwinter.com.
And here's the same file referred to as www.midwinter.com; it ought to be able to get at the parent since the domain is the same.
And here's another iframe, exactly the same except that it doesn't have document.domain = 'www.midwinter.com'; at the top:
Now try this with a parent document that sets its document.domain.