	
	/* ============================================================  */

	function displaySuggest(obj) {
		
		termArray = obj.responseXML.getElementsByTagName('terme');
	
		if(termArray.length > 0) {
		
			for(i = 0; i < termArray.length; i++) {
				
				document.getElementById("termes").appendChild(thisOption = document.createElement("option"));
				
				thisOption.setAttribute("value", termArray[i].getAttribute("id"));	
				thisOption.appendChild(document.createTextNode(termArray[i].firstChild.nodeValue));
			}
			
		}
		
	}
	
	/* ============================================================  */
	
	function makeSuggest(alpha) {

		var table = new Array();
		table["a"] = 0;
		table["b"] = 1;
		table["c"] = 2;
		table["d"] = 3;
		table["e"] = 4;
		table["f"] = 5;
		table["g"] = 6;
		table["h"] = 7;
		table["i"] = 8;
		table["j"] = 9;
		table["k"] = 10;
		table["l"] = 11;
		table["m"] = 12;
		table["n"] = 13;
		table["o"] = 14;
		table["p"] = 15;
		table["q"] = 16;
		table["r"] = 17;
		table["s"] = 18;
		table["t"] = 19;
		table["u"] = 20;
		table["v"] = 21;
		table["w"] = 22;
		table["x"] = 23;
		table["y"] = 24;
		table["z"] = 25;
				
		/* setup the colors */

		var n = document.all.alpha.getElementsByTagName("a");
		for(var i = 0; i <= 25; i++) n[i].style.color = "#B36666";
		n[table[alpha]].style.color = "#CC2B25";

		/* */

		document.getElementById("termes").onchange = function() {

			window.location.href = "?id_definition=" + (this.options[this.selectedIndex].value + "&index=" + alpha+"&id=11.0");
		}
		
		/* */
		
		document.getElementById('termes').innerHTML = ''; // vide l'objet SELECT
		document.getElementById("termes").appendChild(thisOption = document.createElement("option"));
		thisOption.appendChild(document.createTextNode(alpha + " - définitions :"));	

		/* make xml */

		var XHR = new XHRConnection();
		XHR.appendData("alpha", alpha);
		XHR.sendAndLoad("../../makesuggest.php", "POST", displaySuggest);
	}