
function move(e) {
	
	if(typeof infoBulle=='undefined'){return;}
	
	if(isVisible) {
		if (navigator.appName!="Microsoft Internet Explorer") {
		infoBulle.style.left = e.pageX + 10+'px'; // clientX
		infoBulle.style.top = e.pageY + 15+'px';
		}else {
		var sx=0,sy=0;
		// en dessous de 8.0 on ajoute les scrolls
			if(/MSIE [4-7]\./.test(navigator.userAgent)){
			var sx= (document.body.scrollLeft+document.documentElement.scrollLeft) || 0;
			var sy= (document.body.scrollTop+document.documentElement.scrollTop) || 0;
			}
		infoBulle.style.left = 15+event.x+sx+'px';
		infoBulle.style.top = 15+event.y+sy+'px';
		}
	}
}

function showOn(text) {
	
	if(typeof infoBulle=='undefined'){return;}
	if(typeof isVisible=='undefined'){return;}
	
	if(!isVisible) {
	infoBulle.style.visibility = 'visible';
	infoBulle.innerHTML = text;
	isVisible=true;
	}
}

function showTitle(obj) {
	if(obj.title){
	var text=obj.title.replace(/\n/g,'<br />');
	obj.title='';
	showOn(text);
	}
	obj.onmouseout = function(){
	showOff();
	}
	obj.onmouseover= function(){
	showOn(text);
	}
}


function showOff() {
	
	if(typeof infoBulle=='undefined'){return;}
	if(typeof isVisible=='undefined'){return;}
	
	if(isVisible) {
	infoBulle.style.visibility = 'hidden';
	infoBulle.style.left='-200px';
	infoBulle.style.top='0px';
	isVisible=false;
	}
}

onload=function(){
	var div = document.createElement('div');
	div.id='infoBulle';
    document.body.appendChild(div);
	this.infoBulle = document.getElementById('infoBulle');
	this.isVisible = false;
		if(this.infoBulle!='undefined'){
		document.onmousemove=move;
		}
}