<!--
var timeInterval;
var delais=10;
var pasX=8;
var pasY=5;
var ratioOpacite=1;
var ratioPasOpacite=0.02;

var encours="";

thisOne = new Object();

function fadeIt(oCalque) {
	clearInterval(timeInterval);

	encours=oCalque;
	ItemWidth = parseInt(getIt(oCalque).style.width);
	itemHeight = parseInt(getIt(oCalque).style.height);
	if (parseInt(getIt(oCalque).style.width ) >0)
		{fadeOut(oCalque);}
	else
		{fadeIn(oCalque);}
}

function fadeIn(oCalque) {
	show(oCalque);
	timeInterval=setInterval("fade_In('"+oCalque+"')",delais);
}

function fadeOut(oCalque){
	clearInterval(timeInterval);
	timeInterval=setInterval("fade_Out('"+oCalque+"')",delais);
 }

function fade_In(oCalque){
var testX=false;
var testY=false;
	

	thisOne = getIt(oCalque);
	if (parseInt( thisOne.style.width ) <= parseInt( getIt(oCalque+"_contenu").style.width )+pasX)
  		{thisOne.style.width = parseInt(thisOne.style.width)+pasX;}
	else
		{testX=true;}

	if( parseInt( thisOne.style.height ) <= parseInt( getIt(oCalque+"_contenu").style.height )+pasY)
    	{thisOne.style.height = parseInt(thisOne.style.height)+pasY;}
	else
		{testY=true;}
		
	if(testX && testY)
	{
   		clearInterval(timeInterval);
   		if(ie5)	{thisOne.filters.alpha.opacity=ratioOpacite*100;}
   		if(ns6) {thisOne.style.MozOpacity=ratioOpacite;}
	}
	else
	{
  		if(ie5)
	   		{if( thisOne.filters.alpha.opacity < ratioOpacite*100) {thisOne.filters.alpha.opacity += (ratioPasOpacite*100);}}
		if(ns6)
			{if( parseFloat(thisOne.style.MozOpacity) < ratioOpacite)	{thisOne.style.MozOpacity = parseFloat(thisOne.style.MozOpacity) + ratioPasOpacite;}}
	}
}

function fade_Out(oCalque){
var testX=false;
var testY=false;

	thisOne = getIt(oCalque);
	hide(oCalque);
	if( parseInt( thisOne.style.width )  >= 2*pasX )
		{thisOne.style.width = parseInt(thisOne.style.width) -pasX;}
	else
		{testX=true;}
	if( parseInt( thisOne.style.height ) >= 2*pasY)
		{thisOne.style.height = parseInt(thisOne.style.height)-pasY;}
	else
		{testY=true;}
		
	if(testX && testY)
	{
		clearInterval(timeInterval);
   		encours="";
   		fade_reinit(oCalque);
		hide(oCalque);
	}

	if(ie5)
		{if( thisOne.filters.alpha.opacity >= 10)	{thisOne.filters.alpha.opacity -= (ratioPasOpacite*100);}}
	if(ns6)
		{if( parseFloat(thisOne.style.MozOpacity) >= 0.10)	{thisOne.style.MozOpacity =  parseFloat(thisOne.style.MozOpacity) - ratioPasOpacite;}}
}

function fade_reinit(oCalque){
//Sert à remettre un calque en position de départ, sinon la fonction fadeIt lance un fade_out si le calque est passé par un fade_In
	getIt(oCalque).style.width=0;
	getIt(oCalque).style.height=0;
}

//-->