
function updateChildAges(childSelectName, infantSelectName){
    var childSelect = document.getElementById(childSelectName);
    var infantSelect = document.getElementById(infantSelectName);
    if(childSelect!=null && infantSelect!=null){
        var childCount = (childSelect.value-0) + (infantSelect.value-0);
        for(i=0; i<100; i++){
            var title = document.getElementById("childAgeTitle"+i);
            var select = document.getElementById("childAgeSelect"+i);
            if(title==null || select==null) {break;}
            if(i<childCount){
                title.style.display="";
                select.style.display="";
            } else {
                title.style.display="none";
                select.style.display="none";
            }
        }
    }
}