var dyn_carsOptionTree = [['7',[['A3','42'],['A6','45']]],['10',[['3 Series','86'],['5 Series','87'],['X1','2133']]],['16',[['Grand C4 Picasso','2204']]],['26',[['Ecosport','2377'],['Focus','253'],['Ranger','264'],['Transit','904']]],['32',[['CR-Z','2180'],['Insight','287']]],['34',[['i30','1286'],['ix35','2138']]],['35',[['D-MAX','898'],['NNR','2164']]],['36',[['XF','1390']]],['39',[['Ceed','1126']]],['196',[['V80','2664']]],['44',[['IS','368'],['IS 300h','2674'],['NX','2466']]],['51',[['Mazda2','409'],['Mazda6','410']]],['53',[['220','424'],['E Class','448'],['GL Class','1449']]],['61',[['Qashqai','1145']]],['67',[['207','1144'],['208','2230']]],['85',[['Swift','713']]],['88',[['Auris','1154'],['Yaris','758']]],['93',[['Golf','812'],['Jetta','813'],['Passat','817'],['Touran','824']]]] 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 }