var dyn_carsOptionTree = [['16',[['Berlingo','136']]],['26',[['Focus','253'],['Mondeo','259'],['Transit','904']]],['34',[['i30','1286']]],['63',[['Corsa','871']]],['72',[['Clio','612'],['Grand Scenic','1133']]],['80',[['Octavia','682']]],['93',[['Caddy','964'],['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 }