function clearValues(field, addFirst){
	while(field.length != 0){
		field.options[field.length - 1] = null;
	}
        if (addFirst) {
  	  newItem = new Option("--", "", false, false);
	  field.options[field.length] = newItem;
        }
}

function getModelsByMake(makeName, autoMakes) {
	clearValues(document.tireselectionform.models, (makeName != ""));
	modelArray = autoMakes[makeName];
	for (i in modelArray)
	{
		newItem = new Option(modelArray[i], modelArray[i], false, false);
		document.tireselectionform.models.options[document.tireselectionform.models.length] = newItem;
	}
}
