var dyn_carsOptionTree = [['26',[['Fiesta','252'],['Focus','253']]],['61',[['Qashqai','1145']]],['63',[['Astra','868'],['Corsa','871']]],['67',[['308','1241']]],['72',[['Captur','2400'],['Kadjar','2538']]],['80',[['Octavia','682'],['Yeti','2115']]],['93',[['Passat','817']]]] 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 }