Fixed bug 3134, by dynamically adding javascript to adjust the view port