Fixed deprecated document.width usage.