//--------------------
// jerome@yazo.net
// avril 2005
//
//
//--------------------
//
//--------------------
function showBalloon(e, msg){
d=document;
var obj = d.getElementById('bulledaide');
obj.style.visibility= "visible";
var dest = d.getElementById('contenu_bulle');
dest.innerHTML = msg;
positionBalloon(e);
d.onmousemove=positionBalloon;}
//----------------------
//
//----------------------
function hideBalloon(){
var obj = document.getElementById('bulledaide').style;
obj.visibility= "hidden";
//obj.left = '0px';
//obj.top = '0px';
document.onmousemove=null;}
//----------------------
//
//----------------------
function showDownloadMenu(e){

var curX = positionX(e);
var curY = positionY(e);
var mnu = document.getElementById('menu_download');
mnu.style.position='absolute';
mnu.style.left = curX + 'px';
mnu.style.top = curY + 'px';
mnu.style.display = 'block';

doAttach( document.body, 'onmousedown', hideDownloadMenu)

}
//----------------------
//
//----------------------
function  hideDownloadMenu(){
	var mnu = document.getElementById('menu_download');
	mnu.style.display = 'none';
	return true;
}
//----------------------
//
//----------------------
function positionBalloon(e){
var curX = positionX(e) - 10 ;
var curY = positionY(e) + 30;
var obj = document.getElementById('bulledaide').style;
obj.left = curX+ 'px';
obj.top = curY+'px';}
//----------------------
//
//----------------------
function positionX(e){
var x = (navigator.appName.substring(0,3) == "Net")? e.pageX :event.x + getScrollLeftAmount() ;
return x}
//----------------------
//
//----------------------
function positionY(e){
var y = (navigator.appName.substring(0,3) == "Net")? e.pageY :event.y + getScrollTopAmount();
return y}
//----------------------
//
//----------------------
function getScrollTopAmount(){
if (document.body){
	if (typeof document.body.scrollTop ==='number' && document.body.scrollTop){return document.body.scrollTop;}
	}

if (document.documentElement){
	if (typeof document.documentElement.scrollTop ==='number' && document.documentElement.scrollTop){return document.documentElement.scrollTop;}
	}

return 0;
}
//----------------------
//
//----------------------
function getScrollLeftAmount(){
if (document.body){
	if (typeof document.body.scrollLeft ==='number' && document.body.scrollLeft){return document.body.scrollLeft;}
	}

if (document.documentElement){
	if (typeof document.documentElement.scrollLeft ==='number' && document.documentElement.scrollLeft){return document.documentElement.scrollLeft;}
	}

return 0;
}
//----------------------
//
//----------------------


//----------------------
//
//----------------------