addItinery javascript function