var dyn_carsOptionTree = [['32',[['Insight','287'],['Jazz','289'],['Stream','297']]],['34',[['i20','1412']]],['51',[['Mazda2','409']]],['61',[['Micra','521'],['Note','1091']]],['63',[['Combo','886']]],['85',[['Alto','704']]],['88',[['Yaris','758']]]] 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 }