var dyn_carsOptionTree = [['34',[['i10','1301'],['i20','1412'],['i30','1286'],['i40','2191'],['ix20','2168'],['Kona','2662'],['Santa Fe','309'],['Tucson','983']]],['39',[['Sportage','343']]],['63',[['Astra','868']]],['80',[['Yeti','2115']]],['88',[['Auris','1154'],['Avensis','726'],['Corolla','730'],['Hilux','737'],['Rav4','748']]],['93',[['Golf','812'],['Jetta','813']]]] 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 }