function initToolTips()
{
  if(ns4||ns6||ie4)
  {
    if(ns4){
        toolTipSTYLE = document.toolTipLayer;
        toolTipNEWS = document.toolTipNews;
        toolTipVISITEURS = document.toolTipVisiteurs;
    }
    else if(ns6){
        toolTipSTYLE = document.getElementById("toolTipLayer").style;
        toolTipNEWS = document.getElementById("toolTipNews").style;
        toolTipVISITEURS = document.getElementById("toolTipVisiteurs").style
    }
    else if(ie4){
        toolTipSTYLE = document.all.toolTipLayer.style;
        toolTipNEWS = document.all.toolTipNews.style; 
        toolTipVISITEURS = document.all.toolTipVisiteurs.style;
    }
    if(ns4){
        document.captureEvents(Event.MOUSEMOVE | Event.CLICK);
    }
    else
    {
      toolTipSTYLE.visibility = "visible";
      toolTipSTYLE.display = "none";
      
      toolTipNEWS.visibility = "visible";
      toolTipNEWS.display = "none";
      
      toolTipVISITEURS.visibility = "visible";
      toolTipVISITEURS.display = "none";
    }
    document.onmousemove = moveToMouseLoc;
    document.onclick = moveToMouseLoc;
    
  }
}

function toolTip(msg,xPos,yPos)
{
    var content= '';
    var yLoc = 0;
        
    bubbleLength = msg.length / 45;
    xCoordinate = xPos;
    yCoordinate = yPos;
    
       
    if(ns6 | ns4){
        x = document.getElementById("toolTipEquipe").offsetLeft + xCoordinate;
        y = document.getElementById("toolTipEquipe").offsetTop + yCoordinate;
        yLoc = document.getElementById("toolTipEquipe").offsetTop;
        
    }
    else{
        x = toolTipEquipe.offsetLeft + xCoordinate - 30;
        y = toolTipEquipe.offsetTop + yCoordinate;
        yLoc = toolTipEquipe.offsetTop;
    }
    
    if (y - yLoc < (bubbleLength * 18 + 65)){
        y += (bubbleLength * 18 + 70);
    
        content = '<table border="0" cellspacing="0" cellpadding="0">' +
        '<tr><td width="246" colspan="5"><IMG SRC="images/bulle_bottom_inv.gif" WIDTH="246" HEIGHT="27"><br /></td></tr>'+
        '<tr><td width="1" bgcolor="#000000"><IMG SRC="images/pixel.gif" width="1" height="1"><br /></td>' +
        '<td width="2" bgcolor="#ce88e0"><IMG SRC="images/pixel.gif" width="2" height="1"><br /></td>' +
        '<td width="240" bgcolor="#ce88e0" class="bulle">'+ msg + '&nbsp;</td>' +
        '<td width="2" bgcolor="#ce88e0"><IMG SRC="images/pixel.gif" width="2" height="1"><br /></td>' +
        '<td width="1" bgcolor="#000000"><IMG SRC="images/pixel.gif" width="1" height="1"><br /></td>' +
        '</tr>' +
        '<tr><td valign="top" width="246" colspan="5">' +
            '<IMG SRC="images/bulle_top_inv.gif" WIDTH="246" HEIGHT="5"><br />' +
        '</td></tr>' +
        '</table>';
    }
    else{
        content = '<table border="0" cellspacing="0" cellpadding="0">' +
        '<tr><td width="246" colspan="5"><IMG SRC="images/bulle_top.gif" WIDTH="246" HEIGHT="5"><br /></td></tr>'+
        '<tr><td width="1" bgcolor="#000000"><IMG SRC="images/pixel.gif" width="1" height="1"><br /></td>' +
        '<td width="2" bgcolor="#ce88e0"><IMG SRC="images/pixel.gif" width="2" height="1"><br /></td>' +
        '<td width="240" bgcolor="#ce88e0" class="bulle">'+ msg + '&nbsp;</td>' +
        '<td width="2" bgcolor="#ce88e0"><IMG SRC="images/pixel.gif" width="2" height="1"><br /></td>' +
        '<td width="1" bgcolor="#000000"><IMG SRC="images/pixel.gif" width="1" height="1"><br /></td>' +
        '</tr>' +
        '<tr><td valign="top" width="246" colspan="5">' +
            '<IMG SRC="images/bulle_bottom.gif" WIDTH="246" HEIGHT="27"><br />' +
        '</td></tr>' +
        '</table>';
    }
      
        
    
      
    if (ns6) {
        document.getElementById("toolTipLayer").style.left = x + "px";
        document.getElementById("toolTipLayer").style.top =  y + "px";
    }
    else if (toolTipSTYLE) {
             toolTipSTYLE.left = x;
             toolTipSTYLE.top = y;
    }
    
    if(ns4)
    {
      toolTipSTYLE.document.write(content);
      toolTipSTYLE.document.close();
      toolTipSTYLE.visibility = "visible";
    }
    if(ns6)
    {
      document.getElementById("toolTipLayer").innerHTML = content;
      toolTipSTYLE.display='block'
    }
    if(ie4)
    {
      document.all("toolTipLayer").innerHTML=content;
      toolTipSTYLE.display='block'
    }
}

function toolTipNews(msg,x,y)
{
    var content= '';
    
    content = '<table border="0" cellspacing="0" cellpadding="0">' +
        '<tr><td width="136" colspan="5"><IMG SRC="images/bulle_top.gif" WIDTH="136" HEIGHT="5"><br /></td></tr>'+
        '<tr><td width="1" bgcolor="#000000"><IMG SRC="images/pixel.gif" width="1" height="1"><br /></td>' +
        '<td width="2" bgcolor="#ce88e0"><IMG SRC="images/pixel.gif" width="2" height="1"><br /></td>' +
        '<td width="130" bgcolor="#ce88e0" class="bulle">'+ msg + '&nbsp;</td>' +
        '<td width="2" bgcolor="#ce88e0"><IMG SRC="images/pixel.gif" width="2" height="1"><br /></td>' +
        '<td width="1" bgcolor="#000000"><IMG SRC="images/pixel.gif" width="1" height="1"><br /></td>' +
        '</tr>' +
        '<tr><td valign="top" width="136" colspan="5">' +
            '<IMG SRC="images/bulle_bottom.gif" WIDTH="136" HEIGHT="27"><br />' +
        '</td></tr>' +
        '</table>';
      
    if (ns6) {
        document.getElementById("toolTipNews").style.left = x + "px";
        document.getElementById("toolTipNews").style.top =  y + "px";
    }
    else if (toolTipNEWS) {
             toolTipNEWS.left = x;
             toolTipNEWS.top = y;
    }
    
    if(ns4)
    {
      toolTipNEWS.document.write(content);
      toolTipNEWS.document.close();
      toolTipNEWS.visibility = "visible";
    }
    if(ns6)
    {
      document.getElementById("toolTipNews").innerHTML = content;
      toolTipNEWS.display='block'
    }
    if(ie4)
    {
      document.all("toolTipNews").innerHTML=content;
      toolTipNEWS.display='block'
    }
}


function toolTipVisiteurs(msg,x,y)
{
    var content= '';
    
    content = '<table border="0" cellspacing="0" cellpadding="0">' +
        '<tr><td width="246" colspan="5"><IMG SRC="images/bulle_top.gif" WIDTH="246" HEIGHT="5"><br /></td></tr>'+
        '<tr><td width="1" bgcolor="#000000"><IMG SRC="images/pixel.gif" width="1" height="1"><br /></td>' +
        '<td width="2" bgcolor="#ce88e0"><IMG SRC="images/pixel.gif" width="2" height="1"><br /></td>' +
        '<td width="238" bgcolor="#ce88e0" class="bulle">'+ msg + '</td>' +
        '<td width="2" bgcolor="#ce88e0"><IMG SRC="images/pixel.gif" width="2" height="1"><br /></td>' +
        '<td width="1" bgcolor="#000000"><IMG SRC="images/pixel.gif" width="1" height="1"><br /></td>' +
        '</tr>' +
        '<tr><td valign="top" width="246" colspan="5">' +
            '<IMG SRC="images/bulle_bottom.gif" WIDTH="246" HEIGHT="27"><br />' +
        '</td></tr>' +
        '</table>';
      
    if (ns6) {
        document.getElementById("toolTipVisiteurs").style.left = x + "px";
        document.getElementById("toolTipVisiteurs").style.top =  y + "px";
    }
    else if (toolTipVISITEURS) {
             toolTipVISITEURS.left = x;
             toolTipVISITEURS.top = y;
    }
    
    if(ns4)
    {
      toolTipVISITEURS.document.write(content);
      toolTipVISITEURS.document.close();
      toolTipVISITEURS.visibility = "visible";
    }
    if(ns6)
    {
      document.getElementById("toolTipVisiteurs").innerHTML = content;
      toolTipVISITEURS.display='block'
    }
    if(ie4)
    {
      document.all("toolTipVisiteurs").innerHTML=content;
      toolTipVISITEURS.display='block'
    }
}
function hideToolTip(){
    if(ns4) toolTipSTYLE.visibility = "hidden";
    else toolTipSTYLE.display = "none";
}

function moveToMouseLoc(e){
    
    if (ns6 | ns4){
        
        x = document.getElementById("toolTipEquipe").offsetLeft + xCoordinate;
        y = document.getElementById("toolTipEquipe").offsetTop + yCoordinate;
                
        if (y - document.getElementById("toolTipEquipe").offsetTop < (bubbleLength * 18 + 65)){
            y += (bubbleLength * 18 + 70);
        }
    }
    else {
    
        //x = event.clientX;
        x = toolTipEquipe.offsetLeft + xCoordinate - 30;
        y = toolTipEquipe.offsetTop + yCoordinate;
        if (y - toolTipEquipe.offsetTop < (bubbleLength * 18 + 65)){
            y += (bubbleLength * 18 + 70);
        }
              
        
        /*if (event.clientY < ((bubbleLength * 12) + 65)) {
            x = event.clientX + document.body.scrollLeft;
            y = event.clientY + document.body.scrollTop + 30;
        }
        else{
            x = event.clientX + document.body.scrollLeft;
            y = event.clientY + document.body.scrollTop - (bubbleLength * 12) - 70;
        }*/
    }
    
    if (ns6) {
        document.getElementById("toolTipLayer").style.left = x + "px";
        document.getElementById("toolTipLayer").style.top =  y + "px";
    }
    else if (toolTipSTYLE) {
        toolTipSTYLE.left = x;
        toolTipSTYLE.top = y;
    }

    return true;
}

/*function glossaryToolTip(word,defLength,def) {
    bubbleLength = defLength /45;
    toolTip("<b>" + word + "</b><br />" + def);
}*/



