function updateValeuesQ(tarif, price, type)
{
	var div_id="div_"+tarif;
	if(price && price!="" && type!="2") 
	{
		document.getElementById(div_id).style.display="inherit";
		document.getElementById(tarif).value=price;
	}
	else
		document.getElementById(div_id).style.display="none";

}

function updateValeuesB(tarif, price)
{
	var div_id="div_"+tarif;
	if(price && price!="") 
	{
		document.getElementById(div_id).style.display="inherit";
		document.getElementById(tarif).value=price;
	}
	else
		document.getElementById(div_id).style.display="none";

}

function putPrices()
{
	var prices=document.getElementById("list1").value;
	var price_array = prices.split("|");

	updateValeuesQ("c_q", price_array[1], price_array[0]);
	updateValeuesQ("g_q", price_array[2], price_array[0]);
	updateValeuesB("c_b", price_array[3]);
	updateValeuesB("g_b", price_array[4]);
}

