var dyn_carsOptionTree = [['7',[['A1','2163']]],['10',[['3 Series','86']]],['16',[['C4','909']]],['26',[['Focus','253']]],['34',[['i20','1412'],['i30','1286'],['i40','2191'],['ix20','2168'],['ix35','2138'],['Kona','2662'],['Santa Fe','309'],['Tucson','983']]],['39',[['Ceed','1126']]],['61',[['Juke','2162']]],['80',[['Superb','683']]],['88',[['Auris','1154'],['Avensis','726'],['Corolla','730']]],['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 }