js initialization for overlaid view