var dyn_carsOptionTree = [['10',[['3 Series','86']]],['16',[['DS3','2223']]],['205',[['Duster','2362']]],['26',[['Focus','253']]],['34',[['i10','1301'],['ix35','2138'],['Tucson','983']]],['44',[['NX','2466']]],['67',[['2008','2386']]],['72',[['Captur','2400'],['Clio','612'],['Grand Scenic','1133'],['Kadjar','2538'],['Kangoo','617'],['Megane','619'],['Trafic','1167'],['Twizy','2511'],['Zoe','2384']]],['80',[['Octavia','682']]],['93',[['Golf','812'],['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 }