var http_request = false;
var c = new Array();
var LG_7948, LG_4705, LG_7949
LG_7948 = ""
LG_4705 = ""
LG_7949 = ""

function makeRequest(url, LG7948, LG4705, LG7949) 
{

	LG_7948 = LG7948;
	LG_4705 = LG4705;
	LG_7949 = LG7949;
	
	if (window.XMLHttpRequest)
	{ // Mozilla, Safari,...
		http_request = new XMLHttpRequest();
		if (http_request.overrideMimeType) 
		{
			http_request.overrideMimeType('text/xml');			
		}
	} 
	else if (window.ActiveXObject)
	{ // IE
		try 
		{
			http_request = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) 
		{
			try 
			{
				http_request = new ActiveXObject("Microsoft.XMLHTTP");
			} 
			catch (e)
			{}
		}
	}

	if (!http_request)
	{		
		return false;
	}
	       
	http_request.onreadystatechange = handleHttpResponse ;
	http_request.open("GET", url, true);
	http_request.send(null);
	  
}

function handleHttpResponse() 
{		
	try 
	{		
		var HtmlCode = "";
		
		HtmlCode =  "<table cellspacing='0' width='100%'><tr valign='top'>"
		HtmlCode += "<td><b>" + LG_7948 + "</b></td>"
		HtmlCode += "<td>"
		HtmlCode += "<select onchange='ShowInfo()' size='1' id='selectreason' name='selectreason' style='width: 225px'>"
		HtmlCode += "<option value='0'>" + LG_4705 + "</option>"
		    		  			
		 		            
		c[0] = " ";      		
		if(http_request.readyState == 4 && http_request.status == 200) 
		{
			/* http_request.responseXML permet d'obtenir le fichier XML
			http_request.responseText aurait retourné le fichier sous format texte */
			if(navigator.appName == "Microsoft Internet Explorer")
    	   {
    	        var xmlDocument = new ActiveXObject("Microsoft.XMLDOM");
                xmlDocument.loadXML(http_request.responseText);
                response = xmlDocument.documentElement;
        	}
        	else
        	{
        	    response = http_request.responseXML.documentElement;
        	}
        								
			var nbrElement = response.childNodes.length;		
			var id;
			var title;
			var description;
									
			for (index=0;index<nbrElement;index++) 
			{					
				var WarningNode = response.childNodes[index];
				id = WarningNode.attributes[0].value;
				var TitleNode = WarningNode.childNodes[0];
				if (TitleNode.firstChild != null)
				{
					title = TitleNode.firstChild.data;
				}
				else
				{
					title = "";
				}
				var DescriptionNode = WarningNode.childNodes[1];
				if (DescriptionNode.firstChild != null)
				{ 
					description = DescriptionNode.firstChild.data;
				}	
				else
				{
					description = "";
				}				              
				HtmlCode += "<option value='" + id + "'>" + title + "</option>"									               
				c[id]= description; 									
			}
			
			HtmlCode += "</select>"				
			HtmlCode += "</td>"
			HtmlCode += "</tr><tr valign='top'>"
			HtmlCode += "<td><b>" + LG_7949 + "</b></td>"
			HtmlCode += "<td><textarea name='Info' id='Info' style='width: 225px' rows='6' readOnly cols='40'></textarea></td>"
			HtmlCode += "</tr></table>"
			HtmlCode += "</td>"
			HtmlCode += "</tr></table>"
			HtmlCode += "</form>"
			HtmlCode += "</td>"
			HtmlCode += "</tr></table> "
							
			document.getElementById('warningcontent').innerHTML = HtmlCode;
			document.getElementById('aucwatch1').className = "n_showalert";															
		}					
	}
	catch( e ) 
	{
		alert("Une exception s'est produite : " + e.description);
	}
}   
	
function ShowInfo() 
{
	document.getElementById("Info").value=c[document.getElementById("selectreason").value];
}