Fixed javascript errors for ScrollTo