/*****************
Function eraseOnline
Efface la liste des gens Online !
******************/
function eraseOnline(){
  online = document.getElementById("whoisonline");
  online.innerHTML = "";
}
/*****************
Function addOnline
Ajoute "who" a la liste des gens en ligne Online !
******************/
function addOnline(who){
  online = document.getElementById("whoisonline");
  online.innerHTML += "<li>"+ who +"</li>";
}
/***********************
Fonction qui redefinit les popup externe en popup interne
************************/


/*Comenté jusqu'a debuggage total
window.open = function(url,name,opt){

var reg = new RegExp("height.([0-9]*)");
tab = reg.exec(opt);
height = tab[1];

var reg = new RegExp("width.([0-9]*)");
tab = reg.exec(opt);
width = tab[1];

id = name+Math.random(10);
id= name;
createPopup(url,id,width,height);
}
*/


var bulle = false;
var bulleDiv = true;
/*********************
Fonction qui genere une
info bulle collée a la souris
**********************/
function infobulle(txt){
  if(txt!=''){
    if(bulleDiv){
      var div = document.createElement("div");
      div.innerHTML = txt;
      div.id = 'infobulle';
      div.style.position = "absolute";
      div.className = "infobulle";
      document.getElementsByTagName("body")[0].appendChild(div);
      bulleDiv = false;
      }else{
        document.getElementById('infobulle').innerHTML = txt;
        document.getElementById('infobulle').style.display = "block";
      }
      bulle = true;
    }
  }

  /*********************
  Fonction qui détruit
  l'info bulle collée a
  la souris
  **********************/
  function killinfobulle(){
    document.getElementById('infobulle').style.display = "none";
    bulle = false;
  }

  /*********************
  Fonction qui fait
  bouger la souris
  **********************/
  function MOUSEinfobulle(x,y){
    if(bulle){
      document.getElementById('infobulle').style.top = y+15+'px';
      document.getElementById('infobulle').style.left = x+15+'px';
    }
  }

  /********************
  Fonction qui affiche
  et cache un bloc
  grace a son id !
  *********************/
  function view(id){
    if(document.getElementById(id).style.display=='none'){
      document.getElementById(id).style.display = 'block';
      }else{
        document.getElementById(id).style.display = 'none';
      }
    }

    function openFiche (login) {
      fenetre = window.open(makeUrl("trombi/fiche_perso.php?login=" + login), "fiche", "width=800,height=600,toolbar=no,resizable=yes");
    }




    function add(size,goal,id){
      size = size + 3;
      //document.getElementById(id).innerHTML = size;
      document.getElementById('mega'+id).style.height = size + 'px';
      if(size < goal){
        setTimeout('maximal('+size+','+goal+','+id+')',100);
        }else{
          document.getElementById(id).style.display = 'block';
          document.getElementById('mega'+id).style.display = 'none';
        }
      }



