taking into account that the alliance agreement with northern israel was still valid , it committed jehoram to raise his son ahaziah as the successor or crown-prince , when he himself would become king .