function getTarif(station_id, wrapper, table, loader){
	new Ajax.Request(
				'/fr/lot/getPromo',
				{
					method: 'get',
					parameters: {code_lot: station_id, wrapper: wrapper, table: table, loader: loader },
					onSuccess: buildDivTarif
				}
			);
	document.getElementById( loader ).style.display = 'inline';
}

function buildDivTarif(transport, json){
	
	var table = document.getElementById(json.tarif.table);
	
	//-- on vide le tableau
	while (table.tBodies[0].rows.length> 0) {
		table.tBodies[0].deleteRow(0);
		}
	
	for(var i=0; i<json.tarif.dispos.length-1; i++){
		table.tBodies[0].appendChild(document.createElement('tr'));
		var td1 = document.createElement('td');
		td1.appendChild(document.createTextNode("Du "+json.tarif.dispos[i].DEBUT+" au "+json.tarif.dispos[i].FIN));
		var td2 = document.createElement('td');
		td2.appendChild(document.createTextNode(json.tarif.dispos[i].TARIF+" €"));
		table.tBodies[0].rows[i].appendChild(td1);
		table.tBodies[0].rows[i].appendChild(td2);

	}
	document.getElementById( json.tarif.loader ).style.display = 'none';
	Effect.BlindDown(json.tarif.wrapper);
	
	
}
