// JavaScript Document
function ouvrelien(lien){
window.open(lien,'_blank','width=500,height=500');
}
function writedivlien(qui,texte)
{

	document.getElementById(qui).innerHTML = texte;
}
function voirphotolien(lien,titre)
{
	var lien;
	//alert(titre);
	voir('nom_photo');
	if(titre=="") titre='';
	writedivlien('nom_photo','<center><a href="#"  onclick="cache(\'nom_photo\')" ><img border=0 src="'+lien+'" ></a><br>'+titre+'</center>');
	
}


function ouvre(photo,larg,haut)
{
	var lien;
	lien="photo.php?photo="+photo+"&w="+larg+"&h="+haut;
	window.open(lien,"_blank","width="+larg+",height="+haut);
}
function ouvrephoto(lien,larg,haut)
{
	var lien;
	
	window.open(lien,"_blank","width="+larg+",height="+haut+',resizable=yes,scrollbars=yes');
}
function voir(qui)
{
 document.getElementById(qui).style.display='block';
 
}
function cache(qui)
{
 document.getElementById(qui).style.display='none';
}




function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        auto: 3,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
	jQuery('#photoscarousel').jcarousel({
           auto: 3,
        wrap: 'last',
        initCallback: mycarousel_initCallback

    });
	jQuery('#actucarousel').jcarousel({
         vertical: true,
		auto: 4,
		scroll:1,
		visible:1,
		wrap: 'last',
        initCallback: mycarousel_initCallback
    });
	
});
