function showthis(elt)
{
    var img= document.getElementById("image_principale");
    
    var old = img.src;
    img.parentNode.href=elt.src.replace(/\.min_/,"");
    
    img.src=elt.src.replace(/\.min_/,".min2_");
    img.style.opacity=0;
    img.style.filter="alpha(opacity=0)";
    elt.src=old.replace(/\.min2_/,".min_");
    var temp1 = document.createElement("img");
    temp1.src=old;
    var pos = findPos(img);
    temp1.style.position="absolute";
    temp1.style.top=pos[1]+"px";
    temp1.style.left=pos[0]+"px";
    document.body.appendChild(temp1);
    
    temp1.style.opacity=1;
    temp1.style.filter ="alpha(opacity=1)";
    setTimeout(function(){  fadeit(img,temp1)}, 1);

}
function fadeit(elt1,temp1)
{
    if(temp1.style.opacity>0)
    {
	var op=temp1.style.opacity;
	op-=0.1;
	temp1.style.opacity=op;
	temp1.style.filter="alpha(opacity="+op+")";
	elt1.style.opacity=1-op;
	elt1.style.filter="alpha(opacity="+1-op+")";
	setTimeout(function(){  fadeit(elt1,temp1)}, 50);
    }
    else
    {
	temp1.parentNode.removeChild(temp1);
    }
}

function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}
