Added JS functionality to home page to calculate height automatically