var dyn_carsOptionTree = [['205',[['Duster','2362'],['Sandero','2363'],['Sandero Stepway','2506']]],['26',[['Ecosport','2377']]],['34',[['Tucson','983']]],['51',[['Mazda3','925']]],['61',[['Note','1091']]],['63',[['Mokka','2371']]],['72',[['Captur','2400'],['Clio','612'],['Grand Scenic','1133'],['Kadjar','2538'],['Kangoo','617'],['Koleos','1360'],['Megane','619'],['Scenic','621'],['Trafic','1167']]]] function populateTarget(name,triggerObj,targetObj,emptyText) { eval ('tree = ' + name + 'OptionTree') triggerValue = getValue(triggerObj) for (i=0;i -1) value = formObj.options[formObj.selectedIndex].value } else { if (formObj.length) { // radio for (var b = 0; b < formObj.length; b++) if (formObj[b].checked) value = formObj[b].value } else if (formObj.checked) // checkbox value = formObj.value } return value }