function GetId(id)
{
 return document.getElementById(id);
}
var r=false; // La variable i nous dit si la bulle est visible ou non
var id_bulle = '';
function montre_bulle(id) {
  if(r==false) {
      $("#"+id).show();
      r=true;
      id_bulle=id;
  }
}
function cache_bulle(id) {
    if(r==true) {
        $("#"+id).hide();
        r=false;
        id_bulle=id;
    }
}
function get_nav_width()
{
    var width = 0;
    if( typeof( window.innerWidth ) == 'number' ) {
        width = window.innerWidth;
    }
    else if( document.documentElement && (document.documentElement.clientWidth) ) {
     width = document.documentElement.clientWidth;
     }
    else if( document.body && ( document.body.clientWidth) ) {
     width = document.body.clientWidth;
     }
    else {
     width = -1;
      }
  return width;
}

$(document).ready(function(){

    $().mousemove(function(e){

        var nav_width = get_nav_width();
        var x = e.pageX;
        var bulle_size = $("#"+id_bulle).width();
        var margin = (x + bulle_size) - nav_width;
        var offset = (margin > 0) ? (margin + 15) : 0;
        var left = e.pageX - (5 + offset)+ "px";
        var top = e.pageY + 20 + "px";

   if(r == true && id_bulle != '') {
        GetId(id_bulle).style.left = left;
        GetId(id_bulle).style.top = top;
    }
  });

});



var detail_visiteurs = "detail_visiteurs";