Document.domain or window.location.host?

I need to get the domain of the page (mydomain.com)
There seems to be 2 variables to get this info.
document.domain & window.location.host - Both are set in FF & IE.
So whats the difference between these ?

window.location.host contains host part of the address. document.domain contains domain the current document belongs to. The document.domain can be changed to correct the domain: https://developer.mozilla.org/en/DOM/document.domain

You can read here on why changing document.domain is useful: http://www.fettig.net/weblog/2005/11/30/xmlhttprequest-subdomain-update/