Add js functions to manage contact line