//--

function LoadJSServiceForum()
	{
		
	//--
	
	var_item 	= getParamValue("item",anchorTmp);
	var_action 	= getParamValue("action",anchorTmp);
	
	if(var_item==false)
		var_item = 0;

	//-- Les onglets
	
	$("#tabsOK").tabs({ selected: var_item });
	$("#tabsOK2").tabs();
	
	//-- Applicarions des tools-tip
	
	$('*.Tips2').qtip(
	{
		position: {
			corner: {
				target: 'topRight',
				tooltip: 'bottomLeft'
			}
		},
		style: {
			name: 'dark',
			padding: '7px 13px',
			width: {
				max: 300,
				min: 0
			},
			border: {
				width: 3,
				radius: 5,
			},
			tip: true
		}
	});

	//-- Palette de couleurs

	$('.PaletteColor').ColorPicker({
	onSubmit: function(hsb, hex, rgb, el) {
	$(el).val( '#' + hex);
	$(el).css('backgroundColor', '#' + hex);
	$(el).ColorPickerHide();
	},
	onChange: function(hsb, hex, rgb, el) {
	$(el).val( '#' + hex );
	//$(el).css('backgroundColor', '#' + hex);
	$("#"+$(el).attr('id')+"VIEW").css('backgroundColor', '#' + hex);
	},
	onBeforeShow: function () {
	$(this).ColorPickerSetColor(this.value);
	}
	})
	.bind('keyup', function(){
	$(this).ColorPickerSetColor(this.value);
	});
	}

//-- Fonction : 

function ForumSearchTopic()
	{

	//-- On recupere les champs
	
	var formulaire 		= document.getElementById('recherche_topic');
	var mot_cles		= formulaire.mot_cles.value;
	var statut			= formulaire.statut.value;
	var sort_by			= formulaire.sort_by.value;
	var sort_dir 		= formulaire.sort_dir.value;	
	var result_page 	= 0;	
	
	//-- Preparation de la requete
	
	location.hash = "forum.php?page_sw=gestion_topics&go_recherche=1&mot_cles="+encodeURIComponent(mot_cles)+"&sort_by="+sort_by+"&sort_dir="+sort_dir+"&result_page="+result_page+"&statut="+statut+"";
	GetPage("forum.php?page_sw=gestion_topics&go_recherche=1&mot_cles="+encodeURIComponent(mot_cles)+"&sort_by="+sort_by+"&sort_dir="+sort_dir+"&result_page="+result_page+"&statut="+statut+"");
	
	//--
	
	return false;
	}

//-- Fonction : 

function ForumSearchMembre()
	{

	//-- On recupere les champs
	
	var formulaire 		= document.getElementById('recherche_membre');
	var mot_cles		= formulaire.mot_cles.value;
	var statut			= formulaire.statut.value;
	var sort_by			= formulaire.sort_by.value;
	var sort_dir 		= formulaire.sort_dir.value;	
	var recherche_to 	= formulaire.recherche_to.value;
	var result_page 	= 0;	
	
	//-- Preparation de la requete
	
	location.hash = "forum.php?page_sw=gestion_membres&go_recherche=1&mot_cles="+encodeURIComponent(mot_cles)+"&sort_by="+sort_by+"&sort_dir="+sort_dir+"&result_page="+result_page+"&statut="+statut+"&recherche_to="+recherche_to+"";
	GetPage("forum.php?page_sw=gestion_membres&go_recherche=1&mot_cles="+encodeURIComponent(mot_cles)+"&sort_by="+sort_by+"&sort_dir="+sort_dir+"&result_page="+result_page+"&statut="+statut+"&recherche_to="+recherche_to+"");
	
	//--
	
	return false;
	}

//-- Fonction : 

function ForumSearchGroupe()
	{

	//-- On recupere les champs
	
	var formulaire 		= document.getElementById('recherche_groupe');
	var mot_cles		= formulaire.mot_cles.value;
	var sort_by			= formulaire.sort_by.value;
	var sort_dir 		= formulaire.sort_dir.value;	
	var result_page 	= 0;	
	
	//-- Preparation de la requete
	
	location.hash = "forum.php?page_sw=gestion_groupes&go_recherche=1&mot_cles="+encodeURIComponent(mot_cles)+"&sort_by="+sort_by+"&sort_dir="+sort_dir+"&result_page="+result_page+"";
	GetPage("forum.php?page_sw=gestion_groupes&go_recherche=1&mot_cles="+encodeURIComponent(mot_cles)+"&sort_by="+sort_by+"&sort_dir="+sort_dir+"&result_page="+result_page+"");
	
	//--
	
	return false;
	}

//-- Fonction : 

function ForumSearchAvatar()
	{

	//-- On recupere les champs
	
	var formulaire 		= document.getElementById('recherche_avatar');
	var mot_cles		= formulaire.mot_cles.value;
	var sort_by			= formulaire.sort_by.value;
	var sort_dir 		= formulaire.sort_dir.value;	
	var result_page 	= 0;	
	
	//-- Preparation de la requete
	
	location.hash = "forum.php?page_sw=gestion_avatars&go_recherche=1&mot_cles="+encodeURIComponent(mot_cles)+"&sort_by="+sort_by+"&sort_dir="+sort_dir+"&result_page="+result_page+"";
	GetPage("forum.php?page_sw=gestion_avatars&go_recherche=1&mot_cles="+encodeURIComponent(mot_cles)+"&sort_by="+sort_by+"&sort_dir="+sort_dir+"&result_page="+result_page+"");
	
	//--
	
	return false;
	}

//-- Fonction : 

function ForumSearchAdmin()
	{

	//-- On recupere les champs
	
	var formulaire 		= document.getElementById('recherche_administrateur');
	var mot_cles		= formulaire.mot_cles.value;
	var sort_by			= formulaire.sort_by.value;
	var sort_dir 		= formulaire.sort_dir.value;	
	var result_page 	= 0;	
	
	//-- Preparation de la requete
	
	location.hash = "forum.php?page_sw=gestion_admins&go_recherche=1&mot_cles="+encodeURIComponent(mot_cles)+"&sort_by="+sort_by+"&sort_dir="+sort_dir+"&result_page="+result_page+"";
	GetPage("forum.php?page_sw=gestion_admins&go_recherche=1&mot_cles="+encodeURIComponent(mot_cles)+"&sort_by="+sort_by+"&sort_dir="+sort_dir+"&result_page="+result_page+"");
	
	//--
	
	return false;
	}

//--

function ForumUpdateMessage()
	{
			
	//-- 
	
	ListeChamps = "ForumAction=UpdateMessage";
	
	//
	
	ListeChamps = ListeChamps + '&id_message=' + encodeURIComponent (document.getElementById('id_message').value ) + '';
	
	//-- On recupere tous les champs input text
	
	$("input:text").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
		
	//-- On recupere tous les champs input checked
	
	$("input:checked").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs textarea
	
	$("textarea").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs select
	
	$("select").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});

	//--
	
	var xhr = getXhr();
	xhr.open('POST', '/includes/ajax/fonctions.ajax.php', true);
	xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-15');

	var data = ListeChamps;
	xhr.send(data);

	//-- On recupere le resultat
	
	xhr.onreadystatechange = function ()
		{
	
		//-- Le code http
		
		if (xhr.readyState == 4 && xhr.status == 200)
			{
	
			//-- On recupere le resultat
			
			result_html = xhr.responseText;	

			//--
			
			if(result_html==1)
				{
		
				//--
				
				location.hash = "forum.php?page_sw=gestion_topics";
				GetPage("forum.php?page_sw=gestion_topics");
	
				//--
				
				AjaxMsgConfirmation("Informations","Le message a bien été modifié.","good.png");
					
				}
			else
				{
				AjaxMsgConfirmation("Informations","Erreur lors de l'enregistrement.","error.png");
				}
				
			}

		}
		
	//--

	return false;
	}

//--

function ForumAddRang(action)
	{
			
	//-- 
	
	if(action=="add_rang")
		var ListeChamps = "ForumAction=AddRang";
	else
		var ListeChamps = "ForumAction=UpdateRang";
	
	//
	
	ListeChamps = ListeChamps + '&id_rang=' + encodeURIComponent (document.getElementById('id_rang').value ) + '';
	
	//-- On recupere tous les champs input text
	
	$("input:text").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
		
	//-- On recupere tous les champs input checked
	
	$("input:checked").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs textarea
	
	$("textarea").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs select
	
	$("select").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});

	//--
	
	var xhr = getXhr();
	xhr.open('POST', '/includes/ajax/fonctions.ajax.php', true);
	xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-15');

	var data = ListeChamps;
	xhr.send(data);

	//-- On recupere le resultat
	
	xhr.onreadystatechange = function ()
		{
	
		//-- Le code http
		
		if (xhr.readyState == 4 && xhr.status == 200)
			{
	
			//-- On recupere le resultat
			
			result_html = xhr.responseText;	

			//--
			
			if(result_html==1)
				{
		
				//--
				
				location.hash = "forum.php?page_sw=gestion_rangs";
				GetPage("forum.php?page_sw=gestion_rangs");
	
				//--
				
				if(action=="add_rang")
					AjaxMsgConfirmation("Informations","Le rang a bien été enregistré.","good.png");
				else
					AjaxMsgConfirmation("Informations","Le rang a bien été modifié.","good.png");
					
				}
			else
				{
				AjaxMsgConfirmation("Informations","Erreur lors de l'enregistrement.","error.png");
				}
				
			}

		}
		
	//--

	return false;
	}

//--

function ForumAddGroupe(action)
	{
			
	//-- 
	
	if(action=="add_groupe")
		var ListeChamps = "ForumAction=AddGroupe";
	else
		var ListeChamps = "ForumAction=UpdateGroupe";
	
	//
	
	ListeChamps = ListeChamps + '&id_groupe=' + encodeURIComponent (document.getElementById('id_groupe').value ) + '';
	
	//-- On recupere tous les champs input text
	
	$("input:text").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
		
	//-- On recupere tous les champs input checked
	
	$("input:checked").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs textarea
	
	$("textarea").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs select
	
	$("select").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});
		
	//--
	
	ListeChamps = ListeChamps + '&list_user_visible=' + encodeURIComponent( $('#list_user_visible').val()) + '';

	//--
	
	var xhr = getXhr();
	xhr.open('POST', '/includes/ajax/fonctions.ajax.php', true);
	xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-15');

	var data = ListeChamps;
	xhr.send(data);

	//-- On recupere le resultat
	
	xhr.onreadystatechange = function ()
		{
	
		//-- Le code http
		
		if (xhr.readyState == 4 && xhr.status == 200)
			{
	
			//-- On recupere le resultat
			
			result_html = xhr.responseText;	

			//--
			
			if(result_html==1)
				{
		
				//--
				
				location.hash = "forum.php?page_sw=gestion_groupes";
				GetPage("forum.php?page_sw=gestion_groupes");
	
				//--
				
				if(action=="add_groupe")
					AjaxMsgConfirmation("Informations","Le groupe a bien été enregistré.","good.png");
				else
					AjaxMsgConfirmation("Informations","Le groupe a bien été modifié.","good.png");
					
				}
			else
				{
				AjaxMsgConfirmation("Informations","Erreur lors de l'enregistrement.","error.png");
				}
				
			}

		}
		
	//--

	return false;
	}

//--

function ForumAddForum(action)
	{
			
	//-- 
	
	if(action=="add_forum")
		var ListeChamps = "ForumAction=AddForum";
	else
		var ListeChamps = "ForumAction=UpdateForum";
	
	//
	
	ListeChamps = ListeChamps + '&id_forum=' + encodeURIComponent (document.getElementById('id_forum').value ) + '';
	
	//-- On recupere tous les champs input text
	
	$("input:text").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
		
	//-- On recupere tous les champs input checked
	
	$("input:checked").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs textarea
	
	$("textarea").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs select
	
	$("select").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});

	//--
	
	var xhr = getXhr();
	xhr.open('POST', '/includes/ajax/fonctions.ajax.php', true);
	xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-15');

	var data = ListeChamps;
	xhr.send(data);

	//-- On recupere le resultat
	
	xhr.onreadystatechange = function ()
		{
	
		//-- Le code http
		
		if (xhr.readyState == 4 && xhr.status == 200)
			{
	
			//-- On recupere le resultat
			
			result_html = xhr.responseText;	

			//--
			
			if(result_html==1)
				{
		
				//--
				
				location.hash = "forum.php?page_sw=gestion_forums";
				GetPage("forum.php?page_sw=gestion_forums");
	
				//--
				
				if(action=="add_forum")
					AjaxMsgConfirmation("Informations","Le forum a bien été enregistré.","good.png");
				else
					AjaxMsgConfirmation("Informations","Le forum a bien été modifié.","good.png");
					
				}
			else
				{
				AjaxMsgConfirmation("Informations","Erreur lors de l'enregistrement.","error.png");
				}
				
			}

		}
		
	//--

	return false;
	}

//--

function ForumAddCategorie(action)
	{
			
	//-- 
	
	if(action=="add_categorie")
		var ListeChamps = "ForumAction=AddCategorie";
	else
		var ListeChamps = "ForumAction=UpdateCategorie";
	
	//
	
	ListeChamps = ListeChamps + '&id_categorie_update=' + encodeURIComponent (document.getElementById('id_categorie_update').value ) + '';
	
	//-- On recupere tous les champs input text
	
	$("input:text").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
		
	//-- On recupere tous les champs input checked
	
	$("input:checked").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs textarea
	
	$("textarea").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs select
	
	$("select").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});

	//--
	
	var xhr = getXhr();
	xhr.open('POST', '/includes/ajax/fonctions.ajax.php', true);
	xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-15');

	var data = ListeChamps;
	xhr.send(data);

	//-- On recupere le resultat
	
	xhr.onreadystatechange = function ()
		{
	
		//-- Le code http
		
		if (xhr.readyState == 4 && xhr.status == 200)
			{
	
			//-- On recupere le resultat
			
			result_html = xhr.responseText;	

			//--
			
			if(result_html==1)
				{
		
				//--
				
				location.hash = "forum.php?page_sw=gestion_forums";
				GetPage("forum.php?page_sw=gestion_forums");
	
				//--
				
				if(action=="add_categorie")
					AjaxMsgConfirmation("Informations","La catégorie a bien été enregistrée.","good.png");
				else
					AjaxMsgConfirmation("Informations","Le catégorie a bien été modifiée.","good.png");
					
				}
			else
				{
				AjaxMsgConfirmation("Informations","Erreur lors de l'enregistrement.","error.png");
				}
				
			}

		}
		
	//--

	return false;
	}

//--

function ForumAddAvatar()
	{
			
	//-- 
	
	var ListeChamps = "ForumAction=AddAvatar";
	
	//-- On recupere tous les champs input text
	
	$("input:text").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
		
	//-- On recupere tous les champs input checked
	
	$("input:checked").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs textarea
	
	$("textarea").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs select
	
	$("select").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});

	//--
	
	var xhr = getXhr();
	xhr.open('POST', '/includes/ajax/fonctions.ajax.php', true);
	xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-15');

	var data = ListeChamps;
	xhr.send(data);

	//-- On recupere le resultat
	
	xhr.onreadystatechange = function ()
		{
	
		//-- Le code http
		
		if (xhr.readyState == 4 && xhr.status == 200)
			{
	
			//-- On recupere le resultat
			
			result_html = xhr.responseText;	

			//--
			
			if(result_html==1)
				{
		
				//--
				
				location.hash = "forum.php?page_sw=gestion_avatars";
				GetPage("forum.php?page_sw=gestion_avatars");
	
				//--
				
				AjaxMsgConfirmation("Informations","L'avatar a bien été ajouté.","good.png");
					
				}
			else
				{
				AjaxMsgConfirmation("Informations","Erreur lors de l'enregistrement.","error.png");
				}
				
			}

		}
		
	//--

	return false;
	}


//--

function ForumAddAdmin()
	{
			
	//-- 
	
	var ListeChamps = "ForumAction=AddAdmin";
	
	//-- On recupere tous les champs input text
	
	$("input:text").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
		
	//-- On recupere tous les champs input checked
	
	$("input:checked").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs textarea
	
	$("textarea").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs select
	
	$("select").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});

	//--
	
	var xhr = getXhr();
	xhr.open('POST', '/includes/ajax/fonctions.ajax.php', true);
	xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-15');

	var data = ListeChamps;
	xhr.send(data);

	//-- On recupere le resultat
	
	xhr.onreadystatechange = function ()
		{
	
		//-- Le code http
		
		if (xhr.readyState == 4 && xhr.status == 200)
			{
	
			//-- On recupere le resultat
			
			result_html = xhr.responseText;	

			//--
			
			if(result_html==1)
				{
		
				//--
				
				location.hash = "forum.php?page_sw=gestion_admins";
				GetPage("forum.php?page_sw=gestion_admins");
	
				//--
				
				AjaxMsgConfirmation("Informations","L'administrateur a bien été ajouté.","good.png");
					
				}
			else
				{
				AjaxMsgConfirmation("Informations","Erreur lors de l'enregistrement.","error.png");
				}
				
			}

		}
		
	//--

	return false;
	}

//--

function ForumAppliqueTheme(id_theme)
	{
				
	//--
	
	var result_html = file("/includes/ajax/fonctions.ajax.php?ForumAction=AppliqueTheme&id_theme="+id_theme+"");
	
	//--
	
	if(result_html==1)
		{
		AjaxMsgConfirmation("Informations","Le thème a bien été appliqué.","good.png");	
		}
	else
		{
		AjaxMsgConfirmation("Informations","Erreur lors de l'enregistrement.","error.png");		
		}

	}

//--

function ForumUpdateMembre()
	{
			
	//-- 
	
	ListeChamps = "ForumAction=UpdateMembre";
	
	//
	
	ListeChamps = ListeChamps + '&id_membre=' + encodeURIComponent (document.getElementById('id_membre').value ) + '';
	
	//-- On recupere tous les champs input text
	
	$("input:text").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
		
	//-- On recupere tous les champs input checked
	
	$("input:checked").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs textarea
	
	$("textarea").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs select
	
	$("select").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});

	//--
	
	var xhr = getXhr();
	xhr.open('POST', '/includes/ajax/fonctions.ajax.php', true);
	xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-15');

	var data = ListeChamps;
	xhr.send(data);

	//-- On recupere le resultat
	
	xhr.onreadystatechange = function ()
		{
	
		//-- Le code http
		
		if (xhr.readyState == 4 && xhr.status == 200)
			{
	
			//-- On recupere le resultat
			
			result_html = xhr.responseText;	

			//--
			
			if(result_html==1)
				{
		
				//--
				
				location.hash = "forum.php?page_sw=gestion_membres";
				GetPage("forum.php?page_sw=gestion_membres");
	
				//--
				
				AjaxMsgConfirmation("Informations","Le membre a bien été modifié.","good.png");
					
				}
			else
				{
				AjaxMsgConfirmation("Informations","Erreur lors de l'enregistrement.","error.png");
				}
				
			}

		}
		
	//--

	return false;
	}

//--

function ForumMoveTopic()
	{
			
	//-- 
	
	ListeChamps = "ForumAction=MoveTopic";
	
	//
	
	ListeChamps = ListeChamps + '&id_topic=' + encodeURIComponent (document.getElementById('id_topic').value ) + '';
	
	//-- On recupere tous les champs input text
	
	$("input:text").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
		
	//-- On recupere tous les champs input checked
	
	$("input:checked").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs textarea
	
	$("textarea").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs select
	
	$("select").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});

	//--
	
	var xhr = getXhr();
	xhr.open('POST', '/includes/ajax/fonctions.ajax.php', true);
	xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-15');

	var data = ListeChamps;
	xhr.send(data);

	//-- On recupere le resultat
	
	xhr.onreadystatechange = function ()
		{
	
		//-- Le code http
		
		if (xhr.readyState == 4 && xhr.status == 200)
			{
	
			//-- On recupere le resultat
			
			result_html = xhr.responseText;	

			//--
			
			if(result_html==1)
				{
		
				//--
				
				location.hash = "forum.php?page_sw=gestion_topics";
				GetPage("forum.php?page_sw=gestion_topics");
	
				//--
				
				AjaxMsgConfirmation("Informations","Le topic a bien été déplacé.","good.png");
					
				}
			else
				{
				AjaxMsgConfirmation("Informations","Erreur lors de l'enregistrement.","error.png");
				}
				
			}

		}
		
	//--

	return false;
	}

//--

function ForumMoveMessage()
	{
			
	//-- 
	
	ListeChamps = "ForumAction=MoveMessage";
	
	//
	
	ListeChamps = ListeChamps + '&id_message=' + encodeURIComponent (document.getElementById('id_message').value ) + '';
	
	//-- On recupere tous les champs input text
	
	$("input:text").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
		
	//-- On recupere tous les champs input checked
	
	$("input:checked").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs textarea
	
	$("textarea").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs select
	
	$("select").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});

	//--
	
	var xhr = getXhr();
	xhr.open('POST', '/includes/ajax/fonctions.ajax.php', true);
	xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-15');

	var data = ListeChamps;
	xhr.send(data);

	//-- On recupere le resultat
	
	xhr.onreadystatechange = function ()
		{
	
		//-- Le code http
		
		if (xhr.readyState == 4 && xhr.status == 200)
			{
	
			//-- On recupere le resultat
			
			result_html = xhr.responseText;	

			//--
			
			if(result_html==1)
				{
		
				//--
				
				location.hash = "forum.php?page_sw=gestion_topics";
				GetPage("forum.php?page_sw=gestion_topics");
	
				//--
				
				AjaxMsgConfirmation("Informations","Le message a bien été déplacé.","good.png");
					
				}
			else
				{
				AjaxMsgConfirmation("Informations","Erreur lors de l'enregistrement.","error.png");
				}
				
			}

		}
		
	//--

	return false;
	}

//--

function ForumSaveConfiguration()
	{
			
	//-- 
	
	ListeChamps = "ForumAction=SaveConfiguration";
		
	//-- On recupere tous les champs input text
	
	$("input:text").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
		
	//-- On recupere tous les champs input checked
	
	$("input:checked").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs textarea
	
	$("textarea").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs select
	
	$("select").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});

	//--
	
	var xhr = getXhr();
	xhr.open('POST', '/includes/ajax/fonctions.ajax.php', true);
	xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-15');

	var data = ListeChamps;
	xhr.send(data);

	//-- On recupere le resultat
	
	xhr.onreadystatechange = function ()
		{
	
		//-- Le code http
		
		if (xhr.readyState == 4 && xhr.status == 200)
			{
	
			//-- On recupere le resultat
			
			result_html = xhr.responseText;	

			//--
			
			if(result_html==1)
				{
		
				//--
				
				location.hash = "forum.php?page_sw=configuration";
				GetPage("forum.php?page_sw=configuration");
	
				//--
				
				AjaxMsgConfirmation("Informations","Les paramètres a bien été modifiés.","good.png");
					
				}
			else
				{
				AjaxMsgConfirmation("Informations","Erreur lors de l'enregistrement.","error.png");
				}
				
			}

		}
		
	//--

	return false;
	}


//--

function ForumSaveConfigurationBouton()
	{
			
	//-- 
	
	ListeChamps = "ForumAction=SaveConfigurationBouton";
		
	//-- On recupere tous les champs input text
	
	$("input:text").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
		
	//-- On recupere tous les champs input checked
	
	$("input:checked").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs textarea
	
	$("textarea").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});
	
	//-- On recupere tous les champs select
	
	$("select").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent( $(this).attr('value') ) + '';
		});

	//--
	
	var xhr = getXhr();
	xhr.open('POST', '/includes/ajax/fonctions.ajax.php', true);
	xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-15');

	var data = ListeChamps;
	xhr.send(data);

	//-- On recupere le resultat
	
	xhr.onreadystatechange = function ()
		{
	
		//-- Le code http
		
		if (xhr.readyState == 4 && xhr.status == 200)
			{
	
			//-- On recupere le resultat
			
			result_html = xhr.responseText;	

			//--
			
			if(result_html==1)
				{
		
				//--
				
				location.hash = "forum.php?page_sw=configuration";
				GetPage("forum.php?page_sw=configuration");
	
				//--
				
				AjaxMsgConfirmation("Informations","Les paramètres a bien été modifiés.","good.png");
					
				}
			else
				{
				AjaxMsgConfirmation("Informations","Erreur lors de l'enregistrement.","error.png");
				}
				
			}

		}
		
	//--

	return false;
	}

//--

function ForumDeleteCategorie(id_categorie)
	{
			
	//-- 
	
	ListeChamps = "ForumAction=DeleteCategorie&id_categorie="+id_categorie+"";
		
	//--
	
	var xhr = getXhr();
	xhr.open('POST', '/includes/ajax/fonctions.ajax.php', true);
	xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-15');

	var data = ListeChamps;
	xhr.send(data);

	//-- On recupere le resultat
	
	xhr.onreadystatechange = function ()
		{
	
		//-- Le code http
		
		if (xhr.readyState == 4 && xhr.status == 200)
			{
	
			//-- On recupere le resultat
			
			result_html = xhr.responseText;	

			//--
			
			if(result_html==1)
				{
		
				//--
				
				location.hash = "forum.php?page_sw=gestion_forums";
				GetPage("forum.php?page_sw=gestion_forums");
	
				//--
				
				AjaxMsgConfirmation("Informations","La catégorie a bien été supprimée.","good.png");
					
				}
			else
				{
				AjaxMsgConfirmation("Informations","Erreur lors de l'enregistrement.","error.png");
				}
				
			}

		}
		
	//--

	return false;
	}
	
//--

function ForumDeleteForum(id_forum)
	{
			
	//-- 
	
	ListeChamps = "ForumAction=DeleteForum&id_forum="+id_forum+"";
		
	//--
	
	var xhr = getXhr();
	xhr.open('POST', '/includes/ajax/fonctions.ajax.php', true);
	xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-15');

	var data = ListeChamps;
	xhr.send(data);

	//-- On recupere le resultat
	
	xhr.onreadystatechange = function ()
		{
	
		//-- Le code http
		
		if (xhr.readyState == 4 && xhr.status == 200)
			{
	
			//-- On recupere le resultat
			
			result_html = xhr.responseText;	

			//--
			
			if(result_html==1)
				{
		
				//--
				
				location.hash = "forum.php?page_sw=gestion_forums";
				GetPage("forum.php?page_sw=gestion_forums");
	
				//--
				
				AjaxMsgConfirmation("Informations","Le forum a bien été supprimé.","good.png");
					
				}
			else
				{
				AjaxMsgConfirmation("Informations","Erreur lors de l'enregistrement.","error.png");
				}
				
			}

		}
		
	//--

	return false;
	}

//--

function ForumVerouillageForum(id_forum)
	{
			
	//-- 
	
	ListeChamps = "ForumAction=VerouillageForum&id_forum="+id_forum+"";
		
	//--
	
	var xhr = getXhr();
	xhr.open('POST', '/includes/ajax/fonctions.ajax.php', true);
	xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-15');

	var data = ListeChamps;
	xhr.send(data);

	//-- On recupere le resultat
	
	xhr.onreadystatechange = function ()
		{
	
		//-- Le code http
		
		if (xhr.readyState == 4 && xhr.status == 200)
			{
	
			//-- On recupere le resultat
			
			result_html = xhr.responseText;	

			//--
			
			if(result_html==1)
				{
		
				//--
				
				location.hash = "forum.php?page_sw=gestion_forums";
				GetPage("forum.php?page_sw=gestion_forums");
	
				//--
				
				AjaxMsgConfirmation("Informations","Le forum a bien été vérouillé.","good.png");
					
				}
			else
				{
				AjaxMsgConfirmation("Informations","Erreur lors de l'enregistrement.","error.png");
				}
				
			}

		}
		
	//--

	return false;
	}

//--

function ForumDeverouillageForum(id_forum)
	{
			
	//-- 
	
	ListeChamps = "ForumAction=DeverouillageForum&id_forum="+id_forum+"";
		
	//--
	
	var xhr = getXhr();
	xhr.open('POST', '/includes/ajax/fonctions.ajax.php', true);
	xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-15');

	var data = ListeChamps;
	xhr.send(data);

	//-- On recupere le resultat
	
	xhr.onreadystatechange = function ()
		{
	
		//-- Le code http
		
		if (xhr.readyState == 4 && xhr.status == 200)
			{
	
			//-- On recupere le resultat
			
			result_html = xhr.responseText;	

			//--
			
			if(result_html==1)
				{
		
				//--
				
				location.hash = "forum.php?page_sw=gestion_forums";
				GetPage("forum.php?page_sw=gestion_forums");
	
				//--
				
				AjaxMsgConfirmation("Informations","Le forum a bien été dévérouillé.","good.png");
					
				}
			else
				{
				AjaxMsgConfirmation("Informations","Erreur lors de l'enregistrement.","error.png");
				}
				
			}

		}
		
	//--

	return false;
	}

//--

function ForumSaveOrdreForum()
	{
			
	//-- 
	
	ListeChamps = "ForumAction=SaveClassementForum";

	//-- On recupere tous les champs input checked
	
	$("input:checked").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
		
	//-- On recupere tous les champs input text
	
	$("input:text").each(function ()
		{
		ListeChamps = ListeChamps + '&' + $(this).attr('name') + '=' + encodeURIComponent ( $(this).attr('value') ) + '';
		});
		
	//--
	
	var xhr = getXhr();
	xhr.open('POST', '/includes/ajax/fonctions.ajax.php', true);
	xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-15');

	var data = ListeChamps;
	xhr.send(data);

	//-- On recupere le resultat
	
	xhr.onreadystatechange = function ()
		{
	
		//-- Le code http
		
		if (xhr.readyState == 4 && xhr.status == 200)
			{
	
			//-- On recupere le resultat
			
			result_html = xhr.responseText;	

			//--
			
			if(result_html==1)
				{
		
				//--
				
				location.hash = "forum.php?page_sw=gestion_forums";
				GetPage("forum.php?page_sw=gestion_forums");
	
				//--
				
				AjaxMsgConfirmation("Informations","Le classement a bien été enregistré.","good.png");
					
				}
			else
				{
				AjaxMsgConfirmation("Informations","Erreur lors de l'enregistrement.","error.png");
				}
				
			}

		}
		
	//--

	return false;
	}

//--

function ForumSetTeteTopic(id_topic,action)
	{
			
	//-- 
	
	ListeChamps = "ForumAction=SetTeteTopic&id_topic="+id_topic+"&action="+action+"";
		
	//--
	
	var xhr = getXhr();
	xhr.open('POST', '/includes/ajax/fonctions.ajax.php', true);
	xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=iso-8859-15');

	var data = ListeChamps;
	xhr.send(data);

	//-- On recupere le resultat
	
	xhr.onreadystatechange = function ()
		{
	
		//-- Le code http
		
		if (xhr.readyState == 4 && xhr.status == 200)
			{
	
			//-- On recupere le resultat
			
			result_html = xhr.responseText;	

			//--
			
			if(result_html==1)
				{
		
				//--
				
				location.hash = "forum.php?page_sw=gestion_topics";
				GetPage("forum.php?page_sw=gestion_topics");
	
				//--
				
				AjaxMsgConfirmation("Informations","Le topic a bien été placé en tête de liste.","good.png");
					
				}
			else
				{
				AjaxMsgConfirmation("Informations","Erreur lors de l'enregistrement.","error.png");
				}
				
			}

		}
		
	//--

	return false;
	}

//-- Fonction : Desactiver de module

function ForumActionModule(action)
	{
	
	//--
	
	var ListeIDModule = "ForumAction="+action+"&id=";
			
	//-- On recupere tous les modules cochés
	
	$(function() {$(".checked_module:checked").each(function (){ListeIDModule = ListeIDModule + $(this).attr('value') + "|"})});
		
	//--
	
	var result_html = file("/includes/ajax/fonctions.ajax.php?"+ListeIDModule+"");
	
	//--
	
	if(result_html==1)
		{
		
		//--
		
		if(action=="deverou_topics")
			{
			AjaxMsgConfirmation("Informations","Les topics sélectionnés ont bien été dévérouillés.","good.png");
			page = "gestion_topics";
			}
		else if(action=="verou_topics")
			{
			AjaxMsgConfirmation("Informations","Les topics sélectionnés ont bien été vérouillés.","good.png");
			page = "gestion_topics";
			}
		else if(action=="suppression_topics")
			{
			AjaxMsgConfirmation("Informations","Les topics sélectionnés ont bien été supprimés.","good.png");
			page = "gestion_topics";
			}
		else if(action=="suppression_message")
			{
			AjaxMsgConfirmation("Informations","Les messages sélectionnés ont bien été supprimés.","good.png");
			page = "gestion_messages";
			}
		else if(action=="suppression_rang")
			{
			AjaxMsgConfirmation("Informations","Les rangs sélectionnés ont bien été supprimés.","good.png");
			page = "gestion_rangs";
			}
		else if(action=="validation_membre")
			{
			AjaxMsgConfirmation("Informations","Les membres sélectionnés ont bien été validés.","good.png");
			page = "gestion_membres";
			}
		else if(action=="activation_membre")
			{
			AjaxMsgConfirmation("Informations","Les membres sélectionnés ont bien été activés.","good.png");
			page = "gestion_membres";
			}
		else if(action=="desactivation_membre")
			{
			AjaxMsgConfirmation("Informations","Les membres sélectionnés ont bien été désactivés.","good.png");
			page = "gestion_membres";
			}
		else if(action=="suppression_membre")
			{
			AjaxMsgConfirmation("Informations","Les membres sélectionnés ont bien été supprimés.","good.png");
			page = "gestion_membres";
			}
		else if(action=="suppression_groupe")
			{
			AjaxMsgConfirmation("Informations","Les groupes sélectionnés ont bien été supprimés.","good.png");
			page = "gestion_groupes";
			}
		else if(action=="suppretion_avatar")
			{
			AjaxMsgConfirmation("Informations","Les avatars sélectionnés ont bien été supprimés.","good.png");
			page = "gestion_avatars";
			}
		else if(action=="suppression_admin")
			{
			AjaxMsgConfirmation("Informations","Les administrateurs sélectionnés ont bien été supprimés.","good.png");
			page = "gestion_admins";
			}
		
		//--
		
		location.hash = "forum.php?page_sw="+page+"";
		GetPage("forum.php?page_sw="+page+"");
		}
	else
		{
		
		AjaxMsgConfirmation("Informations","Erreur lors de l'enregistrement","error.png");
		page = "";

		//--
	
		location.hash = "forum.php?page_sw="+page+"";
		GetPage("forum.php?page_sw="+page+"");
		}
	
	}

