js version of topview added