Fiche_Cover_Flow_Courante=-1;
LockClickCoverFlow=true;

/* debut defilement */
var cpt=0;
/* fin defilement */

/* ************************************************************* */
	function DoClick(Obj)
	{
		//document.location =Obj.url;
		hauteur=getWindowHeight();
		largeur=getWindowWidth();
		window.open(Obj.url,'_self','toolbar=1, location=1, directories=1, status=1, scrollbars=1, resizable=1, copyhistory=1, menuBar=1, width='+largeur+', height='+hauteur+', left=0, top=0');
	}
/* ************************************************************* */
	function Affiche_Fiche_Coverflow(IdElement)
	{	
		$(document).ready(function () 
		{
				if(IdElement==0)
					$("#FLG_COVERFLOW").css({ visibility:'hidden'});
				else
					$("#FLG_COVERFLOW").css({ visibility:'visible'});	

				if(IdElement==(Liste_Div_Cover_Flow.length-1))
					$("#FLD_COVERFLOW").css({ visibility:'hidden'});
				else
					$("#FLD_COVERFLOW").css({ visibility:'visible'});	
									
				if(Fiche_Cover_Flow_Courante!=-1)
				{
					LeNomDiv=Liste_Div_Cover_Flow[Fiche_Cover_Flow_Courante];
					$("#"+LeNomDiv).css({ visibility:'hidden'});				
				}
				LeNomDiv=Liste_Div_Cover_Flow[IdElement];
				$("#"+LeNomDiv).css({ visibility:'visible'});
				Fiche_Cover_Flow_Courante=IdElement;
				LockClickCoverFlow=false;
		});	
	}
/* ************************************************************* */
	function Fiche_Suivante_Coverflow()
	{	
		if(LockClickCoverFlow)
			return false;
		LockClickCoverFlow=true;
		instanceOne.AvanceImage();
	}
/* ************************************************************* */
	function Fiche_Precedente_Coverflow()
	{	
		instanceOne.defilement=false;
		if(LockClickCoverFlow)
			return false;
		LockClickCoverFlow=true;
		instanceOne.ReculeImage();
	}
/* ************************************************************* */
	function Fiche_Coverflow(NumImage)
	{	
		if(LockClickCoverFlow)
			return false;
		LockClickCoverFlow=true;
		instanceOne.AllerImage(NumImage);
	}
/* ************************************************************* */
function getWindowHeight() {
    var h = 0;
    if (typeof(window.innerHeight) == 'number') { // Netscape
        h = window.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) {
        h = document.documentElement.clientHeight;
    } else if (document.body && document.body.offsetHeight) { //client
        h = document.body.offsetHeight;
    }
    return h;
}
/* ************************************************************* */
function getWindowWidth() {
    var w = 0;
    if (typeof(window.innerWidth) == 'number') { // Netscape
        w = window.innerWidth;
    } else if (document.documentElement && document.documentElement.clientWidth) {
        w = document.documentElement.clientWidth;
    } else if (document.body && document.body.offsetWidth) { //client
        w = document.body.offsetWidth;
    }
    return w;
}
/* *********************************************** AJOUTE PAR MHD ****** */
/* debut defilement */
	function Fiche_Suivante_Coverflow_Defilement(cpt)
	{	
		$(document).ready(function () 
		{
			
				if(instanceOne.defilement==false)
				{
					return false;
				}
				else
				{
					cpt=eval(cpt+1);
					if(cpt>instanceOne.max-1)
					{
						cpt=eval(Math.floor(instanceOne.max/2));
						Fiche_Coverflow(cpt);
						return false;
					}
					LockClickCoverFlow=false;
					Fiche_Suivante_Coverflow();
					window.setTimeout('Fiche_Suivante_Coverflow_Defilement('+cpt+');',3000);		
				}
		})
	}
/* fin defilement */
