Changed script to use full URL rather than DocumentID (parsing the URL for ID)