var chd_arr_years_makes_models = {}; chd_arr_years_makes_models['2024'] = ['']; chd_arr_years_makes_models['2023'] = ['']; chd_arr_years_makes_models['2022'] = ['']; chd_arr_years_makes_models['2021'] = ['']; chd_arr_years_makes_models['2020'] = ['']; function chd_fill_years(objSel, arr, yearoptionsclearstart) { if (yearoptionsclearstart == null) yearoptionsclearstart = 0; objSel.options.length = yearoptionsclearstart; for(var year in arr) { objSel.options[objSel.options.length] = new Option(year, year); } } function chd_fill_makes(objSel, arr, makeoptionsclearstart) { if (makeoptionsclearstart == null) makeoptionsclearstart = 0; objSel.options.length = makeoptionsclearstart; for(var make in arr) { if (isNaN(parseInt(make))) { objSel.options[objSel.options.length] = new Option(make, make); } else { // objSel.options[objSel.options.length] = new Option(arr[make], arr[make]); } } } function chd_fill_models(objSel, arr, modeloptionsclearstart) { if (modeloptionsclearstart == null) modeloptionsclearstart = 0; objSel.options.length = modeloptionsclearstart; for(var i in arr) { objSel.options[objSel.options.length] = new Option(arr[i], arr[i]); } }