javascript adjustment