simplified the javascript for the full height.