var dyn_carsOptionTree = [['7',[['A3','42'],['A4','43'],['A6','45']]],['10',[['3 Series','86'],['7 Series','89']]],['16',[['Grand C4 Picasso','2204']]],['26',[['Ecosport','2377'],['Focus','253'],['Ranger','264'],['Transit','904']]],['32',[['CR-Z','2180'],['Insight','287']]],['34',[['i20','1412'],['i30','1286'],['ix35','2138']]],['35',[['D-MAX','898'],['NNR','2164']]],['39',[['Ceed','1126'],['Picanto','1118']]],['196',[['V80','2664']]],['44',[['IS 300h','2674']]],['51',[['CX-5','2227'],['Mazda2','409'],['Mazda3','925'],['Mazda6','410']]],['53',[['220','424'],['C Class','444'],['E Class','448'],['GL Class','1449'],['GLC Class','2553']]],['58',[['Outlander','892']]],['61',[['Qashqai','1145']]],['63',[['Vivaro','1114']]],['67',[['207','1144'],['208','2230']]],['85',[['Swift','713']]],['88',[['Auris','1154'],['Aygo','974'],['Corolla Verso','1030'],['Landcruiser','738'],['Rav4','748'],['Yaris','758']]],['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 }