How can i make layers and text shown/hidden using function calls for javascript