// Agrandissement de l'image

var offsetxpoint=-20 //Custom l'offset x de la tooltip
var offsetypoint=20 //Custom l'offset y de la tooltip
var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["topdecklink"] : document.getElementById? document.getElementById("topdecklink") : ""

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function popimg(image){
    var content ="<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 <TR><TD><TABLE WIDTH=50% BORDER=0 CELLPADDING=1 CELLSPACING=2><TR><TD BGCOLOR=#000000><CENTER>"+'<img width="675" height="450" src="'+image+'">'+"</CENTER></TD></TR></TABLE></TD></TR></TABLE>";
    /*  width="675" height="450" */
    
    if (ns6||ie){

    tipobj.innerHTML=content;
    enabletip=true;
    return false;
    }
}

function popimgportrait(image){
    var content ="<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 <TR><TD><TABLE WIDTH=50% BORDER=0 CELLPADDING=1 CELLSPACING=2><TR><TD BGCOLOR=#000000><CENTER>"+'<img width="450" height="675" src="'+image+'">'+"</CENTER></TD></TR></TABLE></TD></TR></TABLE>";
    /* */

    if (ns6||ie){

    tipobj.innerHTML=content;
    enabletip=true;
    return false;
    }
}

function get_mouse(e){
	if (enabletip){
		var curX=(ns6)?e.pageX : event.x+ietruebody().scrollLeft;
		var curY=(ns6)?e.pageY : event.y+ietruebody().scrollTop;
// Trouver la distance séparant la souris du bord de la fenêtre
		var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20
		var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20

		var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000

// Si la distance horizontale n'est pas assez grande pour la taille du context menu
		if (rightedge<tipobj.offsetWidth)
// Déplacer la position horizontale du menu sur la gauche par sa taille
		tipobj.style.left=ie? ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+"px" : window.pageXOffset+e.clientX-tipobj.offsetWidth+"px"
		else if (curX<leftedge)
			tipobj.style.left="5px"
			else
// Placer la position horizontale du menu où la souris se trouve
				tipobj.style.left=curX+offsetxpoint+"px"
// Même chose avec la position verticale
		if (bottomedge<tipobj.offsetHeight)
			tipobj.style.top=ie? ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px"
		else
			tipobj.style.top=curY+offsetypoint+"px"
			tipobj.style.visibility="visible"
	}
}

function killlink(){
	if (ns6||ie){
		enabletip=false
		tipobj.style.visibility="hidden"
		tipobj.style.left="-1000px"
		tipobj.style.backgroundColor=''
		tipobj.style.width=''
	}
}

document.onmousemove=get_mouse;
