function ajoutersmiley2(lecode){
/* alert(''+lecode); */


var koidedant=$("#message").val();
var koidedant1 = koidedant+" "+lecode;
/*  alert(koidedant1); */

$("#message").val(koidedant1);
}


function afficherformulaire() {

$('#formulairecache').slideToggle("slow");

}



function afficherformulairereponse(quellereponse) {
    
$('#formulairecache').show(); 
$('#formulairecache').appendTo($('#repondre'+quellereponse));

/*
$('#repondre'+quellereponse).slideUp("slow"); */
$('#repondre'+quellereponse).slideDown("slow");
 

}






function ajoutersmiley(lecode){
/* alert(''+lecode); */


var koidedant=$("#champtexte").val();
var koidedant1 = koidedant+" "+lecode;
/*  alert(koidedant1); */

$("#champtexte").val(koidedant1);
}







function affichertexte(keldiv) {

$('#'+keldiv).slideToggle("slow");
/*$('#'+keldiv).typewriter({'delay':200});*/
}




function ajoutrecent(a)
{

  $("#plusderesultat"+a).html('<img src="/images/loading2.gif" border="0">');
  
  	  $.get("/onglets/textesrecents.php?a="+a,function(html) {

 $("#plusderesultat"+a).html(html).fadeIn();


});

}


function ajoutrecenttoptextes(a,b)
{

  $("#plusderesultattoptextes"+b).html('<img src="/images/loading2.gif" border="0">');
  
  	  $.get("/onglets/textehonneur.php?a="+a+"&b="+b,function(html) {

 $("#plusderesultattoptextes"+b).html(html).fadeIn();


});

}


function ajoutrecentcom(a)
{

  $("#plusderesultatcom"+a).html('<img src="/images/loading2.gif" border="0">');
  
  	  $.get("/onglets/commentairesrecents.php?a="+a,function(html) {

 $("#plusderesultatcom"+a).html(html).fadeIn();


});

}



function popiframe(url,versou)
{


$('#popnuage').css({left: '0%'});
  	        
$("#popnuage").animate({"left": "50%"}, 1000, function(){
       

    } );



        // Animation complete

 $("#popcorpsnuage").html('<img src="/images/loading2.gif" border="0">');
$("#popcorpsnuage").html("<iframe frameborder=\"0\" src=\"/"+url+"\" width=\"100%\" height=\"300\">  <p>Your browser does not support iframes.</p></iframe>");





    var versou = versou || 0;


if(versou==0)
{
$.scrollTo( '#formajoutcom', 800, {easing:'elasout'} );  
 $("#formajoutcom").html('<img src="/images/loading2.gif" border="0">');
$("#formajoutcom").html("<iframe frameborder=\"0\" ALLOWTRANSPARENCY=\"true\" src=\"/"+url+"\" width=\"100%\" height=\"300\">  <p>Your browser does not support iframes.</p></iframe>"); 
}
else
{
$.scrollTo( '#com'+versou, 800, {easing:'elasout'} );
 $("#formajoutcomsouscom"+versou).html('<img src="/images/loading2.gif" border="0">');
$("#formajoutcomsouscom"+versou).html("<iframe frameborder=\"0\" ALLOWTRANSPARENCY=\"true\" src=\"/"+url+"\" width=\"100%\" height=\"300\">  <p>Your browser does not support iframes.</p></iframe>");
}


$("#popnuage").show();

$("#popnuagebehind").show();


 
}




function ouvririframe(url)
{

var quelpage=url;

$('#popnuage').css({left: '0%'});
  	        
$("#popnuage").animate({"left": "50%"}, 1000, function(){
       

    } );


        // Animation complete

 $("#popcorpsnuage").html('<img src="/images/loading2.gif" border="0">');
$("#popcorpsnuage").html("<iframe frameborder=\"0\" src=\""+quelpage+"\" width=\"100%\" height=\"300\">  <p>Your browser does not support iframes.</p></iframe>");



$("#popnuage").show();

$("#popnuagebehind").show();


 
}




function popup(idnews,idmodule)
{


$('#popnuage').css({left: '0%'});
  	        
$("#popnuage").animate({"left": "50%"}, 1000, function(){
       

    } );



        // Animation complete

 $("#popcorpsnuage").html('<img src="/images/loading2.gif" border="0">');
$("#popcorpsnuage").html("<iframe frameborder=\"0\" src=\"/popup/popup.php?a="+idnews+"&b="+idmodule+"\" width=\"100%\" height=\"300\">  <p>Your browser does not support iframes.</p></iframe>");



      

$("#popnuage").show();

$("#popnuagebehind").show();


 
}



function ajoutdejalu(a)
{

  $("#plusderesultatdejalu"+a).html('<img src="/images/loading2.gif" border="0">');
  
  	  $.get("/onglets/lusrecents.php?a="+a,function(html) {

 $("#plusderesultatdejalu"+a).html(html).fadeIn();


});

}






function ajoutrecentmur(a,b)
{

  $("#plusderesultatmur"+a).html('<img src="/images/loading2.gif" border="0">');
  
  	  $.get("/onglets/messagescourtssuivants.php?a="+a+"&recherche="+b,function(html) {

 $("#plusderesultatmur"+a).html(html).fadeIn();


});

}

function ajoutrecentmur2(a,b)
{

  $("#plusderesultatmur"+a).html('<img src="/images/loading2.gif" border="0">');
  
  	  $.get("/onglets/messagescourtssuivants.php?a="+a+"&b="+b,function(html) {

 $("#plusderesultatmur"+a).html(html).fadeIn();


});

}

function ajoutercom(a,b)
{
$.colorbox({href:"/ajoutercommentaire.php?commentaire=0&queltexte="+a+"&aqui="+b,iframe:true, innerWidth:700, innerHeight:500});

}
function suivant(a,b)
{
dirigerverslivre();
  $("#livre").html('<img src="/images/loading2.gif" border="0">');
  
  	  $.get("/tools/textesuivant.php?a="+a+"&b="+b,function(html) {

 $("#livre").html(html).fadeIn();


});
	  
	  
  
}
function dirigerverslivre(lequel) {



$.scrollTo( '#hautlivre', 800, {easing:'elasout'} );

}


function votecommentaire(a,b)
{
  $("#notecom"+a).html('<img src="/images/loading2.gif" border="0">');
  
  	  $.get("/tools/votecommentaire.php?a="+a+"&b="+b,function(html) {
$("#notecom"+a).html(html).fadeIn();
});
	  
	  
  
}


function suivre(a,b)
{
var messagbloc='';
if(a==1)
{
messagbloc='Voulez-vous vraiment suivre les messages courts de ce membre? si OK ils seront visibles sur votre Mur.';
}
else if(a==2)
{
messagbloc='Voulez-vous vraiment ne plus suivre les messages courts de ce membre? si OK ils ne seront plus visibles sur votre Mur.';
}

 if(confirm(messagbloc))
  {

  $("#auteurasuivre").html('<img src="/images/loading2.gif" border="0">');
  
  	  $.get("/tools/bloquesuivi.php?a="+a+"&b="+b,function(html) {
$("#auteurasuivre").html(html).fadeIn();
});

}
	  
	  
  
}



function blocage(a,b)
{
var messagbloc='';
if(a==1)
{
messagbloc='Voulez-vous vraiment bloquer ce membre? si OK il ne pourra pas ajouter de commentaires ni noter vos textes.';
}
else if(a==2)
{
messagbloc='Voulez-vous vraiment debloquer ce membre? si OK il pourra noter et ajouter des commentaires sur vos textes.';
}

 if(confirm(messagbloc))
  {

  $("#auteurabloquer").html('<img src="/images/loading2.gif" border="0">');
  
  	  $.get("/tools/bloqueauteur.php?etatbloquage="+a+"&uidquejebloque="+b,function(html) {
$("#auteurabloquer").html(html).fadeIn();
});

}
	  
	  
  
}

function blocage2(a,b,c)
{
var messagbloc='';
if(a==1)
{
messagbloc='Voulez-vous vraiment bloquer ce membre? si OK il ne pourra pas ajouter de commentaires ni noter vos textes.';
}
else if(a==2)
{
messagbloc='Voulez-vous vraiment debloquer ce membre? si OK il pourra noter et ajouter des commentaires sur vos textes.';
}

 if(confirm(messagbloc))
  {

  $("#auteurabloquer").html('<img src="/images/loading2.gif" border="0">');
  
  	  $.get("/tools/bloqueauteur.php?etatbloquage="+a+"&uidquejebloque="+b+"&c="+c,function(html) {
$("#auteurabloquer"+c).html(html).fadeIn();
});

}
	  
	  
  
}





function gererabuslu(idt)
{
  
   if(confirm("Voulez-vous vraiment marquer comme lu l'abus #"+idt+"?"))
  {
  
  	  $.get("/tools/controlerabusgestion.php?abuslu="+idt,function(html) {
$("#lu"+idt).html(html).fadeIn();
});
	  
	  
  }
}


function gererabusdel(idt)
{
  
   if(confirm("Voulez-vous vraiment supprimer l'abus #"+idt+"?"))
  {
  
  	  $.get("/tools/controlerabusgestion.php?abusdel="+idt,function(html) {
$("#del"+idt).html(html).fadeIn();
});
	  
	  
  }
}



function gestioncategauteur(rien)
{
var quelcategdeplacer;

var a;
a=rien;
quelcategdeplacer = $('#choixcategauteurparmodo option:selected').val();

  $.get("/tools/controlermembre.php?choixcategauteurparmodo="+quelcategdeplacer+"&a="+a,function(html) {

});


}



function gestioncategtexte(a)
{
var quelcategdeplacer;


quelcategdeplacer = $('#choixcategauteurparmodo option:selected').val();

  $.get("/tools/controlertexte.php?quelcategtexte="+quelcategdeplacer+"&a="+a,function(html) {

});


}



function abusmembre(idt)
{
  
   if(confirm("Voulez-vous vraiment signaler un abus concernant le membre #"+idt+"?"))
  {
  
  	  $.get("/tools/controlerabus.php?mod=3&abus="+idt,function(html) {
$("#membresignal"+idt).html(html).fadeIn();
});
	  
	  
  }
}


function abuscommentaire(idt)
{
  
   if(confirm("Voulez-vous vraiment signaler un abus concernant le commentaire #"+idt+"?\n\nPlus vous serez nombreux à le signaler plus votre demande sera traitée rapidement !"))
  {
  
  	  $.get("/tools/controlerabus.php?mod=2&abus="+idt,function(html) {
$("#comsignal"+idt).html(html).fadeIn();
});
	  
	  
  }
}



function abusecrit(idt)
{
  
   if(confirm("Voulez-vous vraiment signaler un abus concernant le texte #"+idt+"?"))
  {
  
  	  $.get("/tools/controlerabus.php?mod=1&abus="+idt,function(html) {
$("#ecritsignal"+idt).html(html).fadeIn();
});
	  
	  
  }
}





function effacertexte(idt)
{
  
   if(confirm("Voulez-vous vraiment effacer votre texte?"))
  {
  
  	  $.get("/tools/controlertexte.php?effacer="+idt,function(html) {
$("#texte"+idt).html(html).fadeIn();
});
	  
	  
  }
}





function level(a)
{
  
  var kezako=$("#kezako").val();

if(kezako==1)
{
 if(confirm("t'es sur que tu veux le mettre en WEBMASTER attention fait pas l'idiot !!"))
  {

  $.get("/tools/controlermembre.php?alevel="+a+"&level="+kezako,function(html) {
$("#statutlevel").html(html).fadeIn();
});

}

}

else {


  	  $.get("/tools/controlermembre.php?alevel="+a+"&level="+kezako,function(html) {
$("#statutlevel").html(html).fadeIn();
});

}
 
	  

}


function leveltroiscom(a)
{
  
  var kezako=$("#kezako2troiscom").val();




  	  $.get("/tools/controlermembre.php?alevelptstroiscom="+a+"&levelptstroiscom="+kezako,function(html) {
$("#statuttroiscom").html(html).fadeIn();
});


 
	  

}

function levelpts(a)
{
  
  var kezako=$("#kezako2").val();




  	  $.get("/tools/controlermembre.php?alevelpts="+a+"&levelpts="+kezako,function(html) {
$("#statutpoints").html(html).fadeIn();
});


 
	  

}

function chgpseudo(a)
{
  
  var kezako=$("#kezako3").val();




  	  $.get("/tools/controlermembre.php?apseudo="+a+"&quelpseudo="+kezako,function(html) {
$("#statutpseudo").html(html).fadeIn();
});


 
	  

}


function chgemail(a)
{
  
  var kezako=$("#kezako4").val();




  	  $.get("/tools/controlermembre.php?aemail="+a+"&quelemail="+kezako,function(html) {
$("#statutemail").html(html).fadeIn();
});


 
	  

}





function bannir(queluid)
{
  
   if(confirm("Voulez-vous vraiment bannir?"))
  {
  
  	  $.get("/tools/controlermembre.php?bannir="+queluid,function(html) {
$("#statutbanni").html(html).fadeIn();
});
	  
	  
  }
}



function debannir(queluid)
{
  
   if(confirm("Voulez-vous vraiment dÃ©bannir?"))
  {
  
  	  $.get("/tools/controlermembre.php?debannir="+queluid,function(html) {
$("#statutbanni").html(html).fadeIn();
});
	  
	  
  }
}


function bannirpourdebon(queluid)
{
  
   if(confirm("Bannir pour de bon ??"))
  {
  
  	  $.get("/tools/controlermembre.php?bannirpourdebon="+queluid,function(html) {
$("#statutbannipourdebon").html(html).fadeIn();
});
	  
	  
  }
}


function fermerpopup() {

 $.get("/actions/retirerfermerpopup.php",function(html) {
  $("#tchatinstantanne").animate({"right": "-=600px"}, 500, function(){
         
 $("#tchatinstantanne").html(""); 

$("#tchatinstantanne").hide(); 

    } );
});

}

function lancerpopup() {
	document.getElementById("tchatinstantanne").style.right = "-600px";
	$("#tchatinstantanne").show();

$("#tchatinstantanne").html('<iframe src="/actions/supermessagerie.php" width="100%" height="100%" FRAMEBORDER="0" scrolling="no"></iframe>');

/*  $('#tchatinstantanne').css({backgroundPosition: '-128px -10px'}); */

  $("#tchatinstantanne").animate({"right": "+=600px"}, 500, function(){
        

   } );



}





function ouvrirtchatinstantanne(a)
		    
		    
		      {
			
		/* $('#mydiv').css('color', 'green') */	
	

	document.getElementById("tchatinstantanne").style.right = "-600px";
	$("#tchatinstantanne").show();





$("#tchatinstantanne").html('<iframe src="/actions/dialoguer.php?uidacontacter='+a+'" width="100%" height="100%" FRAMEBORDER="0" scrolling="no"></iframe>');

 

  $("#tchatinstantanne").animate({"right": "+=600px"}, 500, function(){
        

   } );


		      }








function afficheraidenp() {
 
$("#aidenp").slideToggle("slow");
}








var demarrerenlignec =1;
function tool3deroule()
		    
		    
		      {
			
			
			
	
if(demarrerenlignec==1)
{
 
	
	demarrerenlignec=2;
	
	$("#tool3deroule").slideToggle("slow");  
	  $.get("/tools/tchatstart.php",function(html) {
$("#tool3deroule").html(html).fadeIn();

});
	  
	  
}
else if(demarrerenlignec==2){
	   $("#tool3deroule").slideToggle("slow"); 
	  demarrerenlignec=1;
	
}
		      }
		      












var demarrerenligned =1;
function tool4deroule()
		    
		    
		      {
			
			
			
	
if(demarrerenligned==1)
{
 
	
	demarrerenligned=2;
	
	$("#tool4deroule").slideToggle("slow");  
	  $.get("/tools/infosprofil.php",function(html) {
$("#tool4deroule").html(html).fadeIn();

});
	  
	  
}
else if(demarrerenligned==2){
	   $("#tool4deroule").slideToggle("slow"); 
	  demarrerenligned=1;
	
}
		      }
		      


















	var demarrerenligne =1;
function tool1deroule()
		      {
	
if(demarrerenligne==1)
{
	
	demarrerenligne=2;
	
	$("#tool1deroule").slideToggle("slow");  
	  $.get("/tools/enligne.php",function(html) {
$("#tool1deroule").html(html).fadeIn();

});
	  
	  
}
else if(demarrerenligne==2){
	   $("#tool1deroule").slideToggle("slow"); 
	  demarrerenligne=1;
	
}
		      }
		      
		      
		      
		      



function amisattente()
{
  
    $.get("/tools/amisattente.php",function(html) {
$("#tool2deroule").html('POTENTIELS AMIS EN ATTENTE<br />'+html).fadeIn();

});
  
}


		      
		      

	var demarrerenligne2 =1;
function tool2deroule(action,numamis)
		      {
	
if(demarrerenligne2==1)
{
	
	demarrerenligne2=2;
	
	$("#tool2deroule").slideToggle("slow");  
	
	
	
if(action==1)
{
	
	  $.get("/tools/amisenligne.php",function(html) {
$("#tool2deroule").html('MES AMiS<br />'+html).fadeIn();

});
	  
}	
	
	
else if(action==2)
{
	
	  $.get("/tools/ajouteramis.php?quelamis="+numamis,function(html) {
$("#tool2deroule").html('MES AMiS POTENTIELS<br />'+html).fadeIn();

});
	  
}	
	
	
	
else if(action==3)
{
	
	  $.get("/tools/amisattente.php",function(html) {
$("#tool2deroule").html('POTENTIELS AMIS EN ATTENTE<br />'+html).fadeIn();

});
	  
}	
	
	
	
	
	
	
	
	
	
	
	
	
	
	  
}
else if(demarrerenligne2==2){
	   $("#tool2deroule").slideToggle("slow"); 
	  demarrerenligne2=1;
	
}
   }

function ajouteramis(amispotentiel)
{
  	  $.get("/tools/ajouteramis.php?etreamis="+amispotentiel,function(html) {
$("#resultatamis").html(html).fadeIn();
});  
}



function accepterami(amispotentiel)
{
  
   if(confirm("Voulez vous vraiment accepter ce futur ami?"))
  {
  
  	  $.get("/tools/validerami.php?accepter="+amispotentiel,function(html) {
$("#potentielami"+amispotentiel).html(html).fadeIn();
});
	  
	  
  }
}


function refuserami(amispotentiel)
{
  
   if(confirm("Voulez vous vraiment refuser ce futur ami?"))
  {
  
  
  
  	  $.get("/tools/validerami.php?refuser="+amispotentiel,function(html) {
$("#potentielami"+amispotentiel).html(html).fadeIn();
});
	  
  }
}


function supprimerami(ami)
{
  
  
  if(confirm("Voulez vous vraiment supprimer votre Ami?"))
  {
  
  	  $.get("/tools/validerami.php?delete="+ami,function(html) {
$("#ami"+ami).html("").fadeIn();
});
	  
	  
  }
	  
	  
}



function ajoutertextefavori(queltexte)
{
  
   if(confirm("Voulez-vous vraiment ajouter ce texte dans votre liste de textes favoris?"))
  {
  
  	  $.get("/tools/favoristexte.php?ajouter="+queltexte,function(html) {
$("#textefavori"+queltexte).html(html).fadeIn();
});
	  
	  
  }
}


function supprimertextefavori(queltexte)
{
  
   if(confirm("Voulez-vous vraiment supprimer ce texte de votre liste de textes favoris?"))
  {
  
  	  $.get("/tools/favoristexte.php?supprimer="+queltexte,function(html) {
$("#textefavori"+queltexte).html(html).fadeIn();
});
	  
	  
  }
}





		   

function avancerbrillant()
{
    $("#brillant").animate({backgroundPosition: '500px 0px'}, 3000, function(){
       
   avancerbrillant2();
     } );
}

function avancerbrillant2()
{
    $("#brillant").animate({backgroundPosition: '0px 0px'}, 3000, function(){
       
   avancerbrillant();
     } );
}

function dirigerverscom(lequel) {



$.scrollTo( '#com'+lequel, 800, {easing:'elasout'} );

}




jQuery.fn.sbTooltip = function() {
	return this.each(function(){
		jQuery(this).attr({sbtooltip: jQuery(this).attr("title")}).removeAttr("title");
	});
};



  $(document).ready(function() {




/*

$('#formleboutonpublier').submit(function(){
$('#leboutonpublier').attr('value', 'Veuillez patienter svp');
$('#leboutonpublier').attr('disabled', 'disabled');
});
*/
 // By suppling no content attribute, the library uses each elements title attribute by default
   
$('#lemembreoptions').live("click", function() {

$("#optionsmembre").slideToggle("slow");  

	

});

       	
avancerbrillant();     

  $('#brillant').click(function() {
  
 
 window.location.href="http://www.nouvelle-poesie.com";
  
 
  
  });


/*
 $('#toolbar').mouseover(function() {
  
 
 $('#toolbar').fadeTo("slow", 1);

  
 
  
  });

$('#toolbar').mouseout(function() {
  
 
 $('#toolbar').fadeTo("slow", 0.8);

  
  
  });
*/	
				
	$(".iframegestion").colorbox({width:"60%", height:"90%", iframe:true});
			
			

			
			$().UItoTop({ easingType: 'easeOutQuart' });

  
   });

/*  fleche pour revenir vers le haut de la page*/
(function($){
	$.fn.UItoTop = function(options) {

 		var defaults = {
			text: 'To Top',
			min: 200,
			inDelay:600,
			outDelay:400,
  			containerID: 'toTop',
			containerHoverID: 'toTopHover',
			scrollSpeed: 1200,
			easingType: 'linear'
 		};

 		var settings = $.extend(defaults, options);
		var containerIDhash = '#' + settings.containerID;
		var containerHoverIDHash = '#'+settings.containerHoverID;
		
		$('body').append('<a href="#" id="'+settings.containerID+'">'+settings.text+'</a>');
		$(containerIDhash).hide().click(function(){
			$('html, body').animate({scrollTop:0}, settings.scrollSpeed, settings.easingType);
			$('#'+settings.containerHoverID, this).stop().animate({'opacity': 0 }, settings.inDelay, settings.easingType);
			return false;
		})
		.prepend('<span id="'+settings.containerHoverID+'"></span>')
		.hover(function() {
				$(containerHoverIDHash, this).stop().animate({
					'opacity': 1
				}, 600, 'linear');
			}, function() { 
				$(containerHoverIDHash, this).stop().animate({
					'opacity': 0
				}, 700, 'linear');
			});
					
		$(window).scroll(function() {
			var sd = $(window).scrollTop();
			if(typeof document.body.style.maxHeight === "undefined") {
				$(containerIDhash).css({
					'position': 'absolute',
					'top': $(window).scrollTop() + $(window).height() - 50
				});
			}
			if ( sd > settings.min ) 
				$(containerIDhash).fadeIn(settings.inDelay);
			else 
				$(containerIDhash).fadeOut(settings.Outdelay);
		});

};
})(jQuery);




