  jQuery(document).ready(function(){
  
            
            
            


        
            
        
            var randomnumber = Math.floor(Math.random()*50);
            var randomnumber_espiegle = Math.floor(Math.random()*100);
            var screen_x = jQuery(document).width();
            var screen_y = jQuery(document).height();
            
            
            var randomnumber_x = Math.floor(Math.random()*screen_x);
            var randomnumber_y = Math.floor(Math.random()*screen_y);
            
            if(randomnumber == 0) jQuery('#pullip_play').css({ position:"absolute", top:randomnumber_x, left:randomnumber_y, zIndex:"1000", display:"block" });
            if(randomnumber_espiegle == 1) jQuery('#pullip_espiegle').css({ position:"absolute", top:randomnumber_x, left:randomnumber_y, zIndex:"1000", display:"block" });
            // var randomnumber_x = 10;
            // var randomnumber_y = 10;
            // jQuery('#pullip_play').css({ position:"absolute", top:randomnumber_x, left:randomnumber_y, zIndex:"1000", display:"block" });
            
            
            jQuery('#ajouter_ami').click(function() { //start function when any link is clicked
            jQuery('body').css({cursor:"wait"});
            jQuery.get("php/pullip_add.php?ami=" + jQuery('#ajouter_ami').attr("rel") , { variable: "tetete"}, function(data){alert(data);});
            jQuery('body').css({cursor:"default"});
             return false;
            }); 
            
            jQuery('#button_reglement').click(function() { //start function when any link is clicked
            jQuery("#reglement").show("slow");

            }); 
            
        
            jQuery('#pullip_play a').click(function() { //start function when any link is clicked   
            jQuery('body').css({cursor:"wait"});
            
            jQuery.get("php/pullip_play.php", { variable: "tetete"}, function(data){alert(data);});
            jQuery('body').css({cursor:"default"});
            jQuery('#pullip_play a').css({display:"none"});
             return false;
            });
            
            jQuery('#pullip_espiegle a').click(function() { //start function when any link is clicked   
            jQuery('body').css({cursor:"wait"});
            
            jQuery.get("php/pullip_espiegle.php", { variable: "tetete"}, function(data){alert(data);});
            jQuery('body').css({cursor:"default"});
            jQuery('#pullip_espiegle a').css({display:"none"});
             return false;
            });
            
            
            
            affiche_liste("");
            
            
            
            jQuery('#submit_msn').click(function() { //start function when any link is clicked   

            
            jQuery('body').css({cursor:"wait"});
            $("#emaildiv_msn").html("En cours de chargement...");

            // jQuery.get("php/grab_msn.php", { login_msn: jQuery('#login_msn').attr('value'), pass_msn: jQuery('#pass_msn').attr('value')}, function(data){alert(data);});
            $("#emaildiv_msn").load("php/grab_msn.php?random=" + Math.random() , { randomize: Math.random() , login_msn: jQuery('#login_msn').attr('value'), pass_msn: jQuery('#pass_msn').attr('value'), usr_email: jQuery('#usr_email').attr('value') } );
            
            jQuery('body').css({cursor:"default"});
             return false;
            });
            
            
            
            
            jQuery('#pullip_or').click(function() { //start function when any link is clicked   

            
            jQuery('body').css({cursor:"wait"});
            jQuery.get("php/pullip_or_comptage.php?random=" + Math.random() + "&reponse=" + jQuery('#pullip_or_reponse').attr("value") , { variable: "tetete"}, function(data){alert(data);});
            jQuery('body').css({cursor:"default"});
             return false;
            });
            
            jQuery('#pullip_or_2').click(function() { //start function when any link is clicked   

            
            jQuery('body').css({cursor:"wait"});
            jQuery.get("php/pullip_or_2_comptage.php?random=" + Math.random() + "&reponse=" + jQuery('#pullip_or_reponse').attr("value") , { variable: "tetete"}, function(data){alert(data);});
            jQuery('body').css({cursor:"default"});
             return false;
            });
            
            
            
            
            

            
            setTimeout("get_timer()",1000);
            
            
            jQuery('#hello').flash({
                src: 'swf/news.swf',
                wmode:'transparent',
                width: 980,
                height: 30
            });
            
            
            	function findValueCallback(event, data, formatted) {
              		$("<li>").html( !data ? "No match!" : "Selected: " + formatted).appendTo("#result");
              	}
              	
              	function formatItem(row) {
              		return row[0] + " (<strong>id: " + row[1] + "</strong>)";
              	}
              	function formatResult(row) {
              		return row[0].replace(/(<.+?>)/gi, '');
              	}
              	jQuery("#suggest1").autocomplete(cities);              	
              	jQuery("#suggest2").autocomplete(cities);
              	



            
          
      
  });
  

 function valide_recherche(){
 
 alert("1");
 }

  
  function affiche_liste(obj){
            jQuery('body').css({cursor:"wait"});
            jQuery("#liste_amis").load("php/liste_amis.php?suppression=" + obj);
            jQuery('body').css({cursor:"default"});
            return false;
            }
  
