// Mise à jour des listes via XMLHttpRequest
function liste(f,id_get,id_out) {

var l1    = f.elements[id_get];
var index = l1.selectedIndex;
	if(index > 0) {
	
	var url = 'ajax.php';
	var pars = 'action=modele&marque='+l1.options[index].value;
	
	var myAjax = new Ajax.Updater( {success: id_out}, 
									url, 
									{method: 'get', parameters: pars, onFailure: reportError});
	}else{
		alert("erreur");
	}
	
}

function reportError(request) {
	alert('Sorry. There was an error.');
}

function show_div(id) {
	var div = $(id);
	if(div.style.display == "none") {
		div.style.display = "block"
	}else{
		div.style.display = "none"
	}
}








