added JavaScript to resize and redirect