	$(document).ready(function() {
		$("a[rel=BOPhotos]").fancybox({
			'opacity'		: true,
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic',
			'titlePosition'	: 'over',
			'overlayColor'		: '#000',
			'overlayOpacity'	: 0.7,
			ajax : { type : "POST", url: "/boPhotos.php", data: this.href } // exemple d'envoi de valeur
		});
	});

function btnRubAlbumActif(idalbum,idcat,etat)
{
	//alert(idalbum + '/' + idcat +'/'+etat);
	//alert(etat);
	$("#Rub_" + idalbum + '_' + idcat).html('<div style="width:19px;;height:19px;"><img src="/images/moreajax.gif" /></div>');
	$.ajax({
	type: "POST",
	url: "/ajax/maj_photos.php",
	data: "idalbum="+ idalbum +"&idcat=" + idcat + "&etat=" + etat, 
	cache: false,
	success: function(html){
		$("#Rub_" + idalbum + '_' + idcat).html('');
		$("#Rub_" + idalbum + '_' + idcat).append(html);
		//$("#more"+ID).remove(); // removing old more button
		}
	});
}

function btnRubAlbumActif_FULL(idalbum,idcat,etat)
{
	//alert(idalbum + '/' + idcat +'/'+etat);
	//alert(etat);
	$("#Rub_" + idalbum + '_' + idcat).html('<div style="width:19px;;height:19px;"><img src="/images/moreajax.gif" /></div>');
	$.ajax({
	type: "POST",
	url: "/ajax/maj_photos.php",
	data: "idalbum="+ idalbum +"&idcat=" + idcat + "&etat=" + etat, 
	cache: false,
	success: function(html){
		$("#Rub_" + idalbum + '_' + idcat).html('');
		$("#LstRubAlbum").html(html);
		}
	});
}



function btnRubPhotoActif(idphoto,idcat,etat)
{
	//alert(idphoto + '/' + idcat +'/'+etat);
	//alert(etat);
	$("#RubPhoto_" + idphoto + '_' + idcat).html('<div style="width:19px;;height:19px;"><img src="/images/moreajax.gif" /></div>');
	$.ajax({
	type: "POST",
	url: "/ajax/maj_photos.php",
	data: "idphoto="+ idphoto +"&idcat=" + idcat + "&etat=" + etat, 
	cache: false,
	success: function(html){
		$("#RubPhoto_" + idphoto + '_' + idcat).html('');
		$("#RubPhoto_" + idphoto + '_' + idcat).append(html);
		//$("#more"+ID).remove(); // removing old more button
		}
	});
}

function btnVisibility( idphoto, visible)
{
	$("#BtnVisibility_" + idphoto ).html('<div style="width:19px;;height:19px;"><img src="/images/moreajax.gif" /></div>');
	$.ajax({
	type: "POST",
	url: "/ajax/maj_photos.php",
	data: "idphoto="+ idphoto +"&visible=" + visible, 
	cache: false,
	success: function(html){
		$("#BtnVisibility_" + idphoto ).html('');
		$("#BtnVisibility_" + idphoto ).append(html);
		//$("#more"+ID).remove(); // removing old more button
		}
	});
}

function btnDelSubCategorie( id )
{
	if(confirm('Supprimer la categorie ?'))
	{
	document.frmSubCatPhotos.op.value="AdmCategoriePhotosDel";
	document.frmSubCatPhotos.id.value=id;
	document.frmSubCatPhotos.submit();
	}
}
