Function getDocumentScrollOrigin

Returns the scroll origin of the given document or the current document if no document is given.