var dyn_carsOptionTree = [['10',[['3 Series','86']]],['32',[['Jazz','289']]],['34',[['i30','1286']]],['39',[['Rio','339']]],['51',[['Mazda2','409']]],['61',[['Micra','521'],['Note','1091']]],['63',[['Combo','886'],['Corsa','871'],['Insignia','1405']]],['72',[['Fluence','2169'],['Megane','619']]],['85',[['Alto','704']]],['88',[['Prius','747'],['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 }