var dyn_carsOptionTree = [['7',[['A6','45']]],['10',[['3 Series','86']]],['205',[['Duster','2362'],['Sandero','2363'],['Sandero Stepway','2506']]],['34',[['i40','2191']]],['36',[['F-Pace','2565'],['X-Type','324'],['XE','2528'],['XF','1390']]],['43',[['Discovery','361'],['Range Rover','364'],['Range Rover Evoque','2226']]],['53',[['C Class','444']]],['61',[['Note','1091']]],['63',[['Astra','868']]],['72',[['Captur','2400'],['Grand Scenic','1133'],['Kadjar','2538'],['Koleos','1360'],['Megane','619'],['Trafic','1167'],['Twizy','2511'],['Zoe','2384']]],['88',[['Avensis','726'],['Rav4','748'],['Verso','2142']]],['93',[['Passat CC','2349']]]] 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 }