
function listeClassement(fichierListe, max, ajax, http){
	
	this.appelation = 0;
	this.liste = new Array();
	this.source = fichierListe;
	this.maxLigne = max;
	this.ajax = ajax;	
	this.http = http;	
	
	//Initialisation de l'object AJAX
	if(window.XMLHttpRequest) // FIREFOX
		this.xhr_object = new XMLHttpRequest();
	else if(window.ActiveXObject) // IE
		this.xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
	else
		return(false);
		
	/**
	 * Met à jour la liste des châteaux
	 * @param {int} region
	 * @param {int} appelation
	 * @param {String} order
	 * @param {String} recherche
	 * @param {int} deverouille
	 */
	this.updateListe = function(appelation, order){		
		
		var notification = new Classement();
		var old_appelation = document.getElementById('champAppelation').value;
		
		if(appelation != 'undefined' && appelation !== '' && appelation !== null)
		{
			this.appelation_ref = appelation;
		}
		
		//Mise à jour des champs
		this.ajax.appendData("appelation_ref", appelation);
		this.ajax.appendData("action", "getDateModif");
		this.ajax.appendData("millesime", document.getElementById('champMillesime').value);
		
		var retour = this.ajax.send();		
		
		document.getElementById('dateClassement').innerHTML = retour.responseText;
				
		var link_appelation = '?appelation=' + this.appelation_ref;
		var link_order = (order != null && order != 'undefined') ? '&order=' + order : '';
		
		//Liste des châteaux		
		var fichier = this.source + link_appelation + link_order;
		
		//Notification de chargement
		notification.listeRequest(fichier);
		
		//Mise en surbrillance de l'appelation sélectionnée
		document.getElementById('appelation_' + old_appelation).className = '';
		document.getElementById('appelation_' + appelation).className = 'selected';
		
		//Mise à jour du champ hidden de l'appelation
		document.getElementById('champAppelation').value = appelation;
		
		//Mise à jour du texte de mise à jour		
						
		//DEBUG
	}
}
