My javascript function.