по поводу `document.location`: 
http://stackoverflow.com/questions/2430936/whats-the-difference-between-window-location-and-document-location-in-javascrip