var dyn_carsOptionTree = [['7',[['A4','43']]],['25',[['Panda','228']]],['26',[['Fiesta','252'],['Focus','253']]],['34',[['i40','2191']]],['51',[['121','404'],['Mazda6','410']]],['61',[['Micra','521'],['Qashqai','1145']]],['63',[['Astra','868'],['Corsa','871']]],['67',[['208','2230'],['308','1241']]],['72',[['Clio','612'],['Fluence','2169'],['Grand Scenic','1133']]],['80',[['Octavia','682']]],['85',[['Swift','713']]],['93',[['Golf','812'],['Passat CC','2349']]]] 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 }