clic=1;
clic1=1;
clic3=1;
clique=1;
function deroule(type,ele)
{
	javascript='onmouseover="javascript:this.style.color=\'gray\';" onmouseOut="javascript:this.style.color=\'black;\';"';
	if(type==1 && clic==1)
	{
		
		ele.innerHTML='<span>les Appartements </span><br /><ul style="padding-bottom:10px;padding-left:20px;margin-top:7px;padding-right:7px;border-left:1px #404040 solid;border-right:1px #404040 solid;border-bottom:1px #404040 solid;"><li><a '+javascript+' href="ecrins.php">L\'Ecrins</a></li><li><a '+javascript+' href="bouleau.php">Le Bouleau</a></li><li><a '+javascript+' href="pelvoux.php">Le Pelvoux</a></li><li><a '+javascript+' href="noyer.php">Le Noyer</a></li><li><a '+javascript+' href="sorbier.php">Le Sorbier</a></li></ul>';
		clic=0;
		ele.style.background='#fffbe6 url(./image/bar-lien1.jpg) repeat-x';
		ele.zIndex='11';
	}
	else if(type==1 && clic==0)
	{
		ele.innerHTML='<span>les Appartements </span>';
		clic=1;
		ele.style.background='none';
	}
	else if(type==2 && clic1==0)
	{
		ele.innerHTML='<span>les Chalets </span>';
		clic1=1;
		ele.style.background='none';
	}
	else if(type==3 && clic3==1)
	{
		ele.innerHTML='<span>Gestion</span><br /><ul style="padding-bottom:10px;padding-left:20px;margin-top:7px;margin-top:7px;padding-right:7px;border-left:1px #404040 solid;border-right:1px #404040 solid;border-bottom:1px #404040 solid;"><li><a '+javascript+' href="admin.php">Photos</a></li><li><a '+javascript+' href="ident_admin.php">Identifient</a></li></ul>';
		clic3=0;
		ele.style.background='#fffbe6 url(./image/bar-lien1.jpg) repeat-x';
		ele.zIndex='11';
	}
	else
	{
		ele.innerHTML='<span>Gestion</span>';
		clic3=1;
		ele.style.background='none';
	}
}
function supr(id)
{
	conf=confirm('Etes vous sūr de vouloir supprimer cette photo ?');
	if(conf)
	{
		var xhr1;
		fichier1='supr_ajax.php?id='+id;
		
		if (window.XMLHttpRequest) xhr1 = new XMLHttpRequest();
		else if (window.ActiveXObject) xhr1 = new ActiveXObject('Microsoft.XMLHTTP');
		else
		{
			alert('JavaScript : votre navigateur ne supporte pas l\'AJAX ,mettez le ą jour.');
			return;
		}
		xhr1.open('POST',fichier1,true);
		xhr1.onreadystatechange = function()
			{
				if (xhr1.readyState == 4)
				{
					retour1=xhr1.responseText;
					adresse='a'+id;
					document.getElementById(adresse).innerHTML='';
				}
			}
		xhr1.setRequestHeader('Content-type','application/x-www-form-urlencoded');
		var data1;
		xhr1.send(null);
	}
}