function set_response(params, div)
{
	var xhr = getXhr();
	dwait = getEl("waiting");
	dwait.style.display = "";
    xhr.onreadystatechange = function()
	{
		if(xhr.readyState == 4 && xhr.status == 200)
		{
			dwait.style.display = "none";
			document.getElementById(div).innerHTML = xhr.responseText;
		}
	}

	xhr.open("GET", "/scripts/msn/liste_resultat.php?"+params+"&d="+ (new Date()).getTime(), true);
    xhr.send(null);
}

function setPrices(c_id, div, nump)
{
  var xhr = getXhr();
  //document.getElementById(div).innerHTML = "<p style='text-align:center;color:#0071DB; font-size:10px;'>Loading<br /><img src='/commun/images/common/loading.gif' style='margin:3px;' /></p>";
  
  xhr.onreadystatechange = function()
	{
		if(xhr.readyState == 4 && xhr.status == 200)
		{
			document.getElementById(div).innerHTML = xhr.responseText;
		}
	}

	xhr.open("GET", "/scripts/locaneige/ajax_prix.php?nump="+nump+"&c_id="+c_id+"&d="+ (new Date()).getTime(), true);
  xhr.send(null);
}

function reserve(heb_id, occ_id,date_id, cont_id, div,request)
{
	if(request==1)
	{request="req=1&";}
	else {request="req=0&";}
	var xhr = getXhr();
  //document.getElementById(div).innerHTML = "<p style='text-align:center;color:#0071DB; font-size:10px;'>Recherche des prix<br /><img src='/commun/images/common/loading.gif' style='margin:3px;' /></p>";
  xhr.onreadystatechange = function()
	{
		if(xhr.readyState == 4 && xhr.status == 200)
		{
			document.getElementById(div).innerHTML = xhr.responseText;
			getEl("confirm_resa").style.display = "";
			getEl("confirm_resa").style.top = getTop("tab_tarifs")+"px";
			getEl("confirm_resa").style.height = getHeight("tab_tarifs")+"px";
			getEl("tab_tarifs").className = "transparent_prices";
		}
	}

	xhr.open("GET", "/scripts/locaneige/ajax_prix.php?heb_id="+heb_id+"&occ_id="+occ_id+"&"+request+"date_id="+date_id+"&c_id="+cont_id+"&d="+ (new Date()).getTime(), true);
  xhr.send(null);
}

function showInfos(hid) {
	var div = "infos_" + hid;
	if (document.getElementById(div).style.display == "none") document.getElementById(div).style.display = "inline";
	else document.getElementById(div).style.display = "none";
}