Removed 'helpful' replacement that disallowed relative urls, changed inline javascript tag to wait for page load