function peuplementBanniereAccueil()
{
	longeur_cumulee = 0 ;

	do
	{
		image = document.getElementById("banniere").appendChild(image = document.createElement("img")) ;
		image.src = "../images/photos/petit/" + liste_photos[parcours++] + ".png" ;
		longeur_cumulee += image.width + 5 ;

		if(parcours == nombre_photos)
			parcours = 0 ;
	}
	while(screen.width + 600 > longeur_cumulee) ;
}

function banniereDefilementAccueil()
{
	marge = parseInt(document.getElementById("banniere").style.marginLeft.replace("px", "")) ;
	document.getElementById("banniere").style.marginLeft = (marge-1) + "px" ;

	if(++avancement == document.getElementById("banniere").lastChild.width)
	{
		image = document.getElementById("banniere").appendChild(image = document.createElement("img")) ;
		image.src = "../images/photos/petit/" + liste_photos[parcours++] + ".png" ;

		avancement = 0 ;

		taille = parseInt(document.getElementById("banniere").style.width.replace("px", "")) ;
		document.getElementById("banniere").style.width = (taille + 200) + "px" ;

		if(parcours == nombre_photos)
			parcours = 0 ;
	}
}

interval = null ;

function banniereDefilementGauche()
{
	document.getElementById("fleche_droite").style.visibility = "visible" ;
	marge = parseInt(document.getElementById("banniere").style.marginLeft.replace("px", "")) ;

	if(marge != 0)
		document.getElementById("banniere").style.marginLeft = (marge+3) + "px" ;
	else
		document.getElementById("fleche_gauche").style.visibility = "hidden" ;
}

function banniereDefilementDroite()
{
	document.getElementById("fleche_gauche").style.visibility = "visible" ;
	marge = parseInt(document.getElementById("banniere").style.marginLeft.replace("px", "")) ;

	if(taille_banniere + marge + document.getElementById("derniere_photo").width > screen.width)
		document.getElementById("banniere").style.marginLeft = (marge-3) + "px" ;
	else
		document.getElementById("fleche_droite").style.visibility = "hidden" ;
}

function outFlecheGauche()
{
	clearInterval(interval) ;
}

function outFlecheDroite()
{
	clearInterval(interval) ;
}

function overFlecheGauche()
{
	interval = setInterval("banniereDefilementGauche()", 1) ;
}

function overFlecheDroite()
{
	interval = setInterval("banniereDefilementDroite()", 1) ;
}

function detailsPhotoMobilierObjets(identifiant, panier)
{
	marge = parseInt(document.getElementById("banniere").style.marginLeft.replace("px", "")) ;
	uri = 'mobilier_objets.php?identifiant='+ identifiant + '&categorie=' + categorie + '&marge=' + marge ;

	if(panier == 1)
		uri += '&panier=1' ;

	window.location = uri ;
}

function detailsPhotoSelection(identifiant, panier)
{
	marge = parseInt(document.getElementById("banniere").style.marginLeft.replace("px", "")) ;
	uri = 'selection.php?identifiant='+ identifiant + '&marge=' + marge ;

	if(panier == 1)
		uri += '&panier=1' ;

	window.location = uri ;
}

function detailsPhotoDernieresAcquisitions(identifiant, panier)
{
	marge = parseInt(document.getElementById("banniere").style.marginLeft.replace("px", "")) ;
	uri = 'dernieres_acquisitions.php?identifiant='+ identifiant + '&marge=' + marge ;

	if(panier == 1)
		uri += '&panier=1' ;

	window.location = uri ;
}

function detailsPhotoArtistes(identifiant, panier)
{
	marge = parseInt(document.getElementById("banniere").style.marginLeft.replace("px", "")) ;
	uri = 'artistes.php?identifiant='+ identifiant + '&artiste=' + artiste + '&marge=' + marge ;

	if(panier == 1)
		uri += '&panier=1' ;

	window.location = uri ;
}

function detailsPhotoMonographies(identifiant, panier)
{
	marge = parseInt(document.getElementById("banniere").style.marginLeft.replace("px", "")) ;
	uri = 'monographies.php?identifiant='+ identifiant + '&marge=' + marge ;

	if(panier == 1)
		uri += '&panier=1' ;

	window.location = uri ;
}

function detailsPhotoSalons(identifiant, panier)
{
	marge = parseInt(document.getElementById("banniere").style.marginLeft.replace("px", "")) ;
	uri = 'salons.php?identifiant='+ identifiant + '&nom=' + nom + '&date_debut=' + date_debut + '&marge=' + marge ;

	if(panier == 1)
		uri += '&panier=1' ;

	window.location = uri ;
}

function detailsPhotoExpositions(identifiant, panier)
{
	marge = parseInt(document.getElementById("banniere").style.marginLeft.replace("px", "")) ;
	uri = 'expositions.php?identifiant='+ identifiant + '&nom=' + nom + '&date_debut=' + date_debut + '&marge=' + marge ;

	if(panier == 1)
		uri += '&panier=1' ;

	window.location = uri ;
}
