var visible=false; // La variable i nous dit si la bulle est visible ou non
function GetId(id) {
	return document.getElementById(id);
}
function deplacer(e) {
	if(visible) {  // Si la bulle est visible, on calcul en temps reel sa position ideale
		if (navigator.appName!="Microsoft Internet Explorer") { // Si on est pas sous IE
			GetId("curseur").style.left=e.pageX + 5+"px";
			GetId("curseur").style.top=e.pageY + 10 + "px";
		}
	}
}
function montre(text, width, height) {
	if(visible==false) {
		if(width > 0) GetId("curseur").style.width=width+"px";
		if(height > 0) GetId("curseur").style.height=height+"px";
		GetId("curseur").innerHTML = text; // on copie notre texte dans l'lment html
		GetId("curseur").style.visibility="visible"; // Si il est cacher (la verif n'est qu'une securit) on le rend visible.
		visible=true;
			if (navigator.appName=="Microsoft Internet Explorer") {
				if(document.documentElement.clientWidth>0) {
					GetId("curseur").style.left=20+window.event.x+((document.body.clientWidth - 1000)/2)+"px";
					GetId("curseur").style.top=10+window.event.y+"px";
				} else {
					GetId("curseur").style.left=20+window.event.x+"px";
					GetId("curseur").style.top=10+window.event.y+"px";
				}
			}
	}
}
function cache() {
	if(visible==true) {
		GetId("curseur").style.visibility="hidden"; // Si la bulle est visible on la cache
		visible=false;
	}
}
document.onmousemove=deplacer; // ds que la souris bouge, on appelle la fonction move pour mettre  jour la position de la bulle.
