var Infobulle=new Object;
var posX=0;posY=0;
var xOffset=10;yOffset=10;

function ShowIB(texteinfo) {
	contenu="<TABLE border=0 cellspacing=0 cellpadding="+Infobulle.NbPixel+"><TR bgcolor='"+Infobulle.ColContour+"'><TD><TABLE border=0 cellpadding=2 cellspacing=0 bgcolor='"+Infobulle.ColFond+"'><TR><TD><FONT  face='Arial' color='"+Infobulle.ColTexte+"'>"+texteinfo+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
	var finalPosX=posX-xOffset;
	if (finalPosX<0) finalPosX=0;
	if (document.layers) {
		document.layers["infobulle"].document.write(contenu);
		document.layers["infobulle"].document.close();
		document.layers["infobulle"].top=posY+yOffset;
		document.layers["infobulle"].left=finalPosX;
	    document.layers["infobulle"].visibility="show";}
	    if (document.all) {
			infobulle.innerHTML=contenu;
			document.all["infobulle"].style.top=posY+yOffset;
			document.all["infobulle"].style.left=finalPosX;//f.x-xOffset;
			document.all["infobulle"].style.visibility="visible";
	    }
	    else if (document.getElementById) {
	      document.getElementById("infobulle").innerHTML=contenu;
	      document.getElementById("infobulle").style.top=posY+yOffset;
	      document.getElementById("infobulle").style.left=finalPosX;
	      document.getElementById("infobulle").style.visibility="visible";
	  }
}

function getMousePos(e) {
    if (document.all) {
      posX=event.x+document.body.scrollLeft;
      posY=event.y+document.body.scrollTop;
    }
    else {
      posX=e.pageX;
      posY=e.pageY; 
    }
 }

function HideIB() {
      if (document.layers) {document.layers["infobulle"].visibility="hide";}
      if (document.all) {document.all["infobulle"].style.visibility="hidden";}
      else if (document.getElementById){document.getElementById("infobulle").style.visibility="hidden";}
}

function InitIB(ColTexte,ColFond,ColContour,NbPixel) {
    Infobulle.ColTexte=ColTexte;Infobulle.ColFond=ColFond;Infobulle.ColContour=ColContour;Infobulle.NbPixel=NbPixel;
    if (document.layers) {
	window.captureEvents(Event.MOUSEMOVE);window.onMouseMove=getMousePos;
	document.write("<LAYER name='infobulle' top=0 left=0 visibility='hide'></LAYER>");
    }
    if (document.all) {
	document.write("<DIV id='infobulle' style='position:absolute;z-index:1;top:0;left:0;visibility:hidden'></DIV>");
	document.onmousemove=getMousePos;
    }
    else if (document.getElementById) {
        document.onmousemove=getMousePos;
	document.write("<DIV id='infobulle' style='position:absolute;z-index:1;top:0;left:0;visibility:hidden'></DIV>");
    }
}

InitIB("#515558","#F7F7DE","#CCCCCC",1);