<script type="text/javascript">
function dynamic1(parent,child)
{
var parent_array = new Array();
// This is the default value
parent_array[''] = ['Please select a manufacturer'];
// All other elements
// parent_array['PARENT NAME'] = ['CHILD 1','CHILD 2','CHILD 3','ETC'];
parent_array['Audi'] = ['A3','A4','A5','A6','A8','Q5','Q7','S3','S4','S5','S6','S8','RS6'];
parent_array['Dacia'] = ['Sandero','Logan'];
parent_array['FIAT'] = ['Bravo','Punto','Grande Punto'];
parent_array['Peugeot'] = ['207','308','407','607'];
parent_array['SEAT'] = ['Ibiza','New Ibiza','Leon'];
parent_array['Skoda'] = ['Fabia','Octavia Tour','Octavia 2','Superb'];
// Get the child
var thechild = document.getElementById(child);
// Remove all other options from the select element
thechild.options.length = 0;
// What value are we looking for ?
var parent_value = parent.options[parent.selectedIndex].value;
// No value found, use the default value
if (!parent_array[parent_value]) parent_value = '';
// Set the correct length
thechild.options.length = parent_array[parent_value].length;
// Add the options
for(var i=0;i<parent_array[parent_value].length;i++)
{
thechild.options[i].text = parent_array[parent_value][i];
thechild.options[i].value = parent_array[parent_value][i];
}
}
function displayField2()
{
if(document.getElementById('CarManufacturer').value == "FIAT")
{
document.getElementById('helement2').style.display="";
}
else {
document.getElementById('helement2').style.display="none";
document.getElementById('FindOther2').value="";
document.getElementById('component113').setAttribute("class", "formNoError");
}
}
window.addEvent('domready', function() {
displayField1();
displayField2();
});
</script>