Added Javascript func for Rating