function showHideVoip(divId)
{

	if(findObject(divId).className == "masquer")
	{
		findObject(divId).className = "afficher";
		findObject("flashSwf").className = "masquer";
	}

	else
	{
		findObject(divId).className = "masquer";
		findObject("flashSwf").className = "afficher";
	}
}

function multiClass(eltId)
{
	arrLinkId = new Array(0, 1, 2);
	intNbLinkElt = new Number(arrLinkId.length);
	arrClassLink = new Array('current','ghost');

	for (i=0; i<intNbLinkElt; i++)
	{
		idMenu = "menu_"+arrLinkId[i];
		idTab = "choix_"+arrLinkId[i];

		if (arrLinkId[i] == eltId)
		{
			document.getElementById(idTab).className = arrClassLink[0];
			document.getElementById(idMenu).className = 'afficher';
		}

		else
		{
			document.getElementById(idTab).className = arrClassLink[1];
			document.getElementById(idMenu).className = 'masquer';
		}
	}
}

function tarifPays(name)
{
	document.body.style.cursor = "wait";
		if (window.XMLHttpRequest)
			xhr_object = new XMLHttpRequest();

		else if (window.ActiveXObject)
			xhr_object = new ActiveXObject("Microsoft.XMLHTTP");

		else
		{
			document.body.style.cursor = "auto";
			return;
		}

	var data = null;
	data = "country="+escape(name);
	xhr_object.open("POST", "/fr/observatoire/tarif-pays.php", true);
	xhr_object.setRequestHeader("content-type", "application/x-www-form-urlencoded");
	xhr_object.send(data);
	xhr_object.onreadystatechange = function()
	{
		if (xhr_object.readyState == 4)
		{
			var reponse = xhr_object.responseText;
			var tmp = reponse.split('&');
			var tarifBox = new Array();
			for(x in tmp)
			{
				var tb = tmp[x].split('=');
				tarifBox[x] = new Array(2);
				tarifBox[x][0] = tb[0];
				tarifBox[x][1] = tb[1];
			}

			//liste de Boxes
			var box = new Array('LiveBox', 'FreeBox', 'NeufBox', 'AliceBox', 'Numericable', 'DartyBox', 'Bbox');
			for (y in box)
			{
				for (x=0; x<tarifBox.length; x++)
				{
					if (tarifBox[x][0] == box[y])  //Pour la mise en communication CR
					{
						findObject(box[y]).innerHTML = tarifBox[x][1];
					}

					if(tarifBox[x][0]== box[y]+'PM')
					{
						findObject(box[y]+'PM').innerHTML = tarifBox[x][1];
					}
				}
			}

			var boxGSM = new Array('LiveBoxGSM', 'FreeBoxGSM', 'NeufBoxGSM', 'AliceBoxGSM', 'NumericableGSM', 'DartyBoxGSM', 'BboxGSM');
			var boxPMGSM = new Array('LiveBoxPMGSM', 'FreeBoxPMGSM', 'NeufBoxPMGSM', 'AliceBoxPMGSM', 'NumericablePMGSM', 'DartyBoxPMGSM', 'BboxPMGSM');
			for (y in boxGSM)
			{
				for (x=0; x<tarifBox.length; x++)
				{
					if (tarifBox[x][0] == boxGSM[y])
					{
						findObject(boxGSM[y]).innerHTML = tarifBox[x][1];
					}
				}
			}

			for (z in boxPMGSM)
			{
				for (x=0; x<tarifBox.length; x++)
				{
					if (tarifBox[x][0] == boxPMGSM[z])
					{
						findObject(boxPMGSM[z]).innerHTML = tarifBox[x][1];
					}
				}
			}

	  document.body.style.cursor = "auto";

		}
	}
	return;
}
