JavaScript part completed