var dyn_carsOptionTree = [['25',[['500','218']]],['26',[['Fiesta','252'],['Focus','253']]],['32',[['Jazz','289'],['Stream','297']]],['34',[['i20','1412'],['i30','1286']]],['39',[['Ceed','1126']]],['53',[['E Class','448']]],['61',[['Micra','521'],['Note','1091'],['Tiida','1177']]],['67',[['207','1144'],['208','2230']]],['72',[['Megane','619']]],['88',[['Prius','747'],['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 }