function fTypeFureteurInternetExplorer(){	var fureteurNom = navigator.appName; 	if (fureteurNom=="Microsoft Internet Explorer")	{		return 1;	}	return 0;}function fAction(pSection){	document.frmAction.invSection.value = pSection;	document.frmAction.invMode.value = pMode;	document.frmAction.submit();}function fConfirmation(pId){	confirmation=confirm("Désirez-vous réellement supprimer cet événement ?");	if (confirmation==true)	{		window.location="?s=admin&mode=modifier&type=calendrier&evenement=liste&btnSupprimer="+pId;	}}/*function fValidationAlerte(pSection){	if (fTypeFureteurInternetExplorer() == 1)	{		if (pSection == 'nouvelle')		{			validation = true;			if (document.frmAction.txtTitre.value == "")			{				alert('Le champ Titre ne doit pas être vide...');				document.all("titre").style.background = '#fff666';				validation = false;			}		}		if (validation)		{			document.frmAction.submit();		}	}	else	{		if (pSection == 'nouvelle')		{			validation = true;			document.getElementById("champ_titre").style.background = '#ffffff';			document.getElementById("champ_contenu").style.background = '#ffffff';			document.getElementById("champ_bref").style.background = '#ffffff';			if (frmAction.txtTitre.value == "")			{				document.getElementById("champ_titre").style.background = '#fff666';				validation = false;				alert('Le champ Titre ne doit pas être vide...');			}			else if (frmAction.txtContenu.value == "")			{				document.getElementById("champ_contenu").style.background = '#fff666';				validation = false;				alert('Le champ Contenu ne doit pas être vide...');			}			else if (frmAction.txtBref.value == "")			{				document.getElementById("champ_bref").style.background = '#fff666';				validation = false;				alert('Le champ En bref ne doit pas être vide...');			}		}		if (validation)		{			frmAction.submit();		}	}}*/function fStatutAlerte(pSel){	if (fTypeFureteurInternetExplorer() == 1)	{		document.all("messageEnAttente").style.display = "none"; 	}	else	{		document.getElementById("messageEnAttente").style.display = "none"; 	}	if(pSel == 0)	{		if (fTypeFureteurInternetExplorer() == 1)		{			document.all('indiceStatut').style.backgroundImage = "url(img/statut-hors-ligne.gif)";		}		else		{			document.getElementById("indiceStatut").style.backgroundImage = "url(img/statut-hors-ligne.gif)"; 		}	}	if(pSel == 1)	{		if (fTypeFureteurInternetExplorer() == 1)		{			document.all('indiceStatut').style.backgroundImage = "url(img/statut-en-ligne.gif)";		}		else		{			document.getElementById("indiceStatut").style.backgroundImage = "url(img/statut-en-ligne.gif)"; 		}	}	if(pSel == 2)	{		if (fTypeFureteurInternetExplorer() == 1)		{			document.all('indiceStatut').style.backgroundImage = "url(img/statut-en-attente.gif)";			document.all('messageEnAttente').style.display = "block";		}		else		{			document.getElementById("messageEnAttente").style.display = "block"; 			document.getElementById("indiceStatut").style.backgroundImage = "url(img/statut-en-attente.gif)"; 		}	}	if(pSel == 3)	{		if (fTypeFureteurInternetExplorer() == 1)		{			document.all('indiceStatut').style.backgroundImage = "url(img/statut-supprimer.gif)";		}		else		{			document.getElementById("indiceStatut").style.backgroundImage = "url(img/statut-supprimer.gif)"; 		}		alert("La sauvegarde de ce statut entrainera la suppression définitive de cet item.");	}}function fOutilTexte(pEffet, pNomChamp) {	// IE    if (fTypeFureteurInternetExplorer() == 1)	{		if (document.selection)		{			if (pEffet == "lien")			{				var selection = document.selection.createRange();				var textuel = selection.text;				var url = prompt("URL:","http://");	  			if (url != null) 				{	    			selection.text = "{url:"+ url +"}["+ textuel +"]";				}			}			if (pEffet == "courriel")			{				var selection = document.selection.createRange();				var textuel = selection.text;				var url = prompt("E-mail address/Adresse courriel","");	  			if (url != null) 				{	    			var sujet = prompt("sujet/subject", "");	    			if(sujet != null)	    			{	    				selection.text = "{url:mailto:"+ url +"?subject="+ sujet+"}["+ textuel +"]";					}					else					{						selection.text = "{url:mailto:"+ url +"}["+ textuel +"]";					}				}			}			if (pEffet == "gras")			{				var selection = document.selection.createRange();				var textuel = selection.text;				selection.text = "<b>"+ textuel +"</b>";			}			if (pEffet == "italique")			{				var selection = document.selection.createRange();				var textuel = selection.text;				selection.text = "<i>"+ textuel +"</i>";			}		}		//alert(selection.text);	}	else	{		var nomChamp = eval("document.frmAction."+pNomChamp);		var selection = (nomChamp.value).substring(nomChamp.selectionStart, nomChamp.selectionEnd);				if (selection != "")		{			if (pEffet == "lien")			{				var url = prompt("","http://");	 			if (url != null) 				{					var chaine = "{url:"+ url +"}["+ selection +"]";				}				else				{					var chaine = selection;				}			}			if (pEffet == "courriel")			{				var url = prompt("E-mail address/Adresse courriel","");	 			if (url != null) 				{	 				var sujet = prompt("sujet/subject", "");	 				if(sujet != null)	    			{	 					var chaine = "{url:mailto:"+ url +"?subject="+ sujet+"}["+ selection +"]";					}					else					{						var chaine = "{url:mailto:"+ url +"}["+ selection +"]";					}				}				else				{					var chaine = selection;				}			}			if (pEffet == "gras")			{	 			var chaine = "<b>"+ selection +"</b>";			}			if (pEffet == "italique")			{	 			var chaine = "<i>"+ selection +"</i>";			}						var debut = nomChamp.selectionStart;			var fin = nomChamp.textLength;			var finTexte = nomChamp.value.substring(nomChamp.selectionEnd, fin);   			var debutTexte = nomChamp.value.substring(0, debut);			nomChamp.value = debutTexte + chaine + finTexte;   			nomChamp.selectionStart = debut;   			nomChamp.selectionEnd = debut;		}		return; 	}}function fRemplaceDiv(pNomDiv,pNomNouveauDiv){	if (fTypeFureteurInternetExplorer() == 1)	{		document.all(pNomDiv).style.display = "none";		if (pNomNouveauDiv != '')		{			document.all(pNomNouveauDiv).style.display = "block";		}	}	else	{		document.getElementById(pNomDiv).style.display = "none"; 		if (pNomNouveauDiv != '')		{			document.getElementById(pNomNouveauDiv).style.display = "table";		}	}}function fNouveauDiv(pTypeFichier, pNomDiv, pTitre, pTitre2, pNomChamp){	if (fTypeFureteurInternetExplorer() == 1)	{		var valeurAleatoire = Math.ceil(Math.random()*10000);		//if (pTypeFichier == "img")		//{			var nouveau = "<div class=fichier-apercu><div class=champ-fichier>"+ pTitre +" : <input type=file name=tel"+ pNomChamp +"_"+ valeurAleatoire +" ></div></div><br clear='all'/>";			var valeurActuelle = document.all[pNomDiv].innerHTML;			document.all[pNomDiv].insertAdjacentHTML("beforeEnd", nouveau);		//}		//if (pTypeFichier == "son")		//{			//var nouveau = "<div class=fichier-apercu><div class=champ-fichier>"+ pTitre +" : <input type=file name=tel"+ pNomChamp +"_"+ valeurAleatoire +"></div><div>"+ pTitre2 +" : <input type=text class=medium name=txt"+ pNomChamp +"_"+ valeurAleatoire +"></div></div>";			//document.all[pNomDiv].insertAdjacentHTML("beforeEnd", nouveau);		//}	}	else	{		var valeurAleatoire = Math.ceil(Math.random()*10000);		//if (pTypeFichier == "img")		//{			var nouveau = "<div class=fichier-apercu><div class=champ-fichier>"+ pTitre +" : <input type=file name=tel"+ pNomChamp +"_"+ valeurAleatoire +" ></div></div><br clear='all'/>";			var r = document.getElementById(pNomDiv).ownerDocument.createRange();			r.setStartBefore(document.getElementById(pNomDiv));			var parsedHTML = r.createContextualFragment(nouveau);			document.getElementById(pNomDiv).appendChild(parsedHTML);		//}		//if (pTypeFichier == "son")		//{			//var nouveau = "<div class=fichier-apercu><div class=champ-fichier>"+ pTitre +" : <input type=file name=tel"+ pNomChamp +"_"+ valeurAleatoire +"></div><div>"+ pTitre2 +" : <input type=text class=medium name=txt"+ pNomChamp +"_"+ valeurAleatoire +"></div></div>";			//var r = document.getElementById(pNomDiv).ownerDocument.createRange();			//r.setStartBefore(document.getElementById(pNomDiv));			//var parsedHTML = r.createContextualFragment(nouveau);			//document.getElementById(pNomDiv).appendChild(parsedHTML);		//}	}}function fInfoInvisible(pChamp, pValeur){	if (fTypeFureteurInternetExplorer() == 1)	{		var valeurChamp = eval("document.frmAction."+pChamp).value;		if (valeurChamp == '')		{			eval("document.frmAction."+pChamp).value = pValeur;		}		else		{			eval("document.frmAction."+pChamp).value = eval("document.frmAction."+pChamp).value +","+ pValeur;		}	}	else	{		var valeurChamp = eval("document.frmAction."+pChamp).value;		if (valeurChamp == '')		{			eval("document.frmAction."+pChamp).value = pValeur;		}		else		{			eval("document.frmAction."+pChamp).value = eval("document.frmAction."+pChamp).value +","+ pValeur;		}	}}function fApercuTeleversement(pApercu){	var chemin = pApercu;	//document.frmAction.submit();		/*if (chemin.substr((chemin.length)-4, 4).toLowerCase() == ".jpg" || chemin.substr((chemin.length)-5, 5).toLowerCase == ".jpeg")	{		var nouvelleImage =  new Image;		nouvelleImage.src = chemin;		document.imgApercu.src = nouvelleImage.src;	}	else	{		alert("Le fichier choisi doit ?e de type jpg ou jpeg.");	}*/}