var dyn_carsOptionTree = [['7',[['A4','43']]],['26',[['Fiesta','252']]],['34',[['Atoz','301'],['Getz','304']]],['51',[['Mazda3','925']]],['61',[['Kubistar','1008'],['Micra','521'],['Pixo','2143'],['Qashqai','1145']]],['63',[['Astra','868'],['Zafira','541']]],['67',[['207','1144']]],['72',[['Clio','612']]],['78',[['Leon','673']]],['80',[['Octavia','682']]],['85',[['Swift','713']]],['88',[['Yaris','758']]],['93',[['Golf','812'],['Passat','817'],['Polo','819']]]] 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 }