finished layout home page on refresh by javaScript