var dyn_carsOptionTree = [['10',[['3 Series','86']]],['205',[['Duster','2362']]],['34',[['i10','1301'],['i20','1412'],['i30','1286'],['i40','2191'],['ix20','2168'],['ix35','2138'],['Kona','2662'],['Santa Fe','309'],['Tucson','983']]],['39',[['Sportage','343']]],['61',[['Qashqai','1145']]],['80',[['Octavia','682'],['Superb','683']]],['85',[['Vitara','714']]],['88',[['Auris','1154'],['Rav4','748']]],['93',[['Golf','812']]]] 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 }