// déconnexion

function logout() 
{
	
	$.ajax
	({
		type: 'POST',
		url: "/ajax/Logout.php",		
		dataType: 'json',

		success: function (reponse) 
		{    	
			var page = $('div#header div.navigation').attr('currentpage');
			
			if (page=="mailbox" || page=="wags" || page=="profile")
			{
				document.location.href = "/";
			}
			else
			{
				document.location.href = "";
			}
			
		},

		error: function () {
			// alert('error');
		}

	});// End Ajax

}


