function cm_load_models(make_select, model_select_id, empty_label, selected) {
	m = (make_select.selectedIndex > 0) ?
		make_select.options[make_select.selectedIndex].text :
		"";
	url = "/ajax/cm_list_models.php";
	url += "?m=" + encodeURIComponent(m);
	url += "&empty_label=" + encodeURIComponent(empty_label);
	url += "&selected=" + encodeURIComponent(selected);
	$("#" + model_select_id).load(url, {}, function() { cm_set_model(model_select_id, selected) } );
	
}

function cm_set_model(model_select_id, value) {
	s = document.getElementById(model_select_id);
	for (i in s.options) {
		if (s.options[i].value == value) {
			s.selectedIndex = i;
			break;
		}
	}
}

