
function desactiver_bt(taille_tab)
{
	for  (i=0; i<taille_tab;i++)
	{
		document.getElementById('img_menu_'+  i ).src=document.getElementById('img_menu_'+  i ).src.replace("_on","_off");
	}
}

function AfficherAlertDeconnexion(adresseDeconnexion)
{
	Ext.MessageBox.show({
				title: 'Deconnexion',
				msg: 'Voulez-vous vous déconnecter ?',
				closable:false,
				multiline: false,
				width:300,
				buttons: {ok:'OK', cancel:'Annuler'},
				fn: function(btn){if(btn=='ok'){top.location=adresseDeconnexion;}},
				animEl: 'Item_BtnDeconnexion'
		});
}

function AfficherProjetDesactiver(message, objetListe, ProjetASelectionne)
{
	var IndexASelectionne = 0;
	for(i=0;i<objetListe.options.length;i++)
	{
		if(objetListe.options[i].value == ProjetASelectionne)
		{
			IndexASelectionne = i;
		}
	}
	
	objetListe.selectedIndex = IndexASelectionne;


		Ext.MessageBox.show({
					title: 'Cloturé',
					msg: message,
					closable:false,
					multiline: false,
					width:300,
					buttons: {ok:'OK'},
					//fn: function(btn){if(btn=='ok'){return false;}},
					animEl: 'sous_menu'
		});
}

function verifListe(chaine, objetListe, ProjetASelectionne, pageRedir)
{
	TabChaine = chaine.split("$$¤¤$$");
	for(i=0;i<TabChaine.length;i++)
	{
		if(TabChaine[i].indexOf(objetListe.value + "|") != -1)
		{
			AfficherProjetDesactiver(TabChaine[i].replace(objetListe.value + "|", ""), objetListe, ProjetASelectionne);
			return false;
		}
	}	
	top.location.href=pageRedir;
}
