<!--
//-------------------------------------------------------------------------------
//	Modif :
//	- 23/10/2006 DD : utiliser plutôt sigma-navigateur.js (-> getResponseService)
//-------------------------------------------------------------------------------
var xhr_object;

function getContentURL(method, strUrl, strData, strAction) {
		
	var retour = "";

	if (window.XMLHttpRequest) // Firefox   
		xhr_object = new XMLHttpRequest();
	else if(window.ActiveXObject) // Internet Explorer  
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");   
	else { // XMLHttpRequest non supporté par le navigateur   
		alert("Erreur : Votre navigateur ne supporte pas les objets XMLHTTPRequest");
		return;
	}
	 
	if (method != "POST" && strData != "") {
		strUrl = strUrl + "?" + strData;
	}
	xhr_object.open(method, strUrl, false); 
	
	xhr_object_onreadystatechange = function() {
		if(xhr_object.readyState == 4) {
			var retour = xhr_object.responseText;
			
			//alert(xhr_object.status);
			if (retour.indexOf("\"") >= 0 || xhr_object.status != 200) {
				alert("Erreur : \n\n" + retour);
				retour = "";
			}
			else {
			//alert(retour);
				//retour = replaceAll(retour, "'", "\\'");
				//retour = replaceAll(retour, "\n", "\\n");
				retour = retour.replace(new RegExp("'", "g"), "\\'");
				retour = retour.replace(new RegExp("\n", "g"), "\\n");				
				retour = strAction.replace(new RegExp("contentUrl", "g"), "'" + retour + "'");
				
				eval(retour);
			}			
			xhr_object = null;
		}
	}
	
	if (method == "POST") {
		xhr_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded");   
	}
	xhr_object.send(strData);
	
	xhr_object_onreadystatechange();
		   	
	return retour;
}

function getResponseURL(method, strUrl, strData) {
	var xhr_object;
	
	var retour = "";

	if(window.XMLHttpRequest) // Firefox   
		xhr_object = new XMLHttpRequest();
	else if(window.ActiveXObject) // Internet Explorer  
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");   
	else { // XMLHttpRequest non supporté par le navigateur   
		alert("Erreur : Votre navigateur ne supporte pas les objets XMLHTTPRequest");
		return;
	}
	 
	if (method != "POST") {
		strUrl = strUrl + "?" + strData;
	}

	xhr_object.open(method, strUrl, false);
		
	xhr_object.send(strData);
	
	retour = xhr_object.responseText;	
	
	return retour;
}


function getResponseURL_2(method, strUrl, strData) {
// Version test DCA - 27/11/2006
	var xhr_object;
	
	var retour = "";

	if(window.XMLHttpRequest) // Firefox   
		xhr_object = new XMLHttpRequest();
	else if(window.ActiveXObject) // Internet Explorer  
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");   
	else { // XMLHttpRequest non supporté par le navigateur   
		alert("Erreur : Votre navigateur ne supporte pas les objets XMLHTTPRequest");
		return;
	}
	 
	if (method != "POST") {
		strUrl = strUrl + "?" + strData;
	}

	xhr_object.open(method, strUrl, true);
	xhr_object.send(strData);

	xhr.onreadystatechange=function()
	    {
	    if (xhr.readyState == 4) // 4=httpComplete
	        {
	        if (xhr.status == 200) // 200 : code Http : OK
	            {
	            // Traitement de la réponse
	            retour=xhr.responseText;
	            }
	        }
    }
}


// utilisation de sigma-navigateur
function getResponseService(url, params) {	
	var monService = new SigmaService();
	monService.url = url;
	monService.params = params;
	//monService.callback = handler;
	monService.lancerSynchrone();
	
	return monService.reponseText;
}

//-->