Javascript family tree