added js functions for home page