function ouvredetail(qui){
	$( "#infosaccueil"+qui ).show('slide');
	$( "#infosaccueila"+qui ).hide('slide');
}
function fermedetail(qui){
	$( "#infosaccueil"+qui ).hide('slide');
	$( "#infosaccueila"+qui ).show('slide');
}
function ajcarnet(lien,qui){

//	alert(lien);
		if(texte = file(lien))
					{
						writedivlien(qui,texte);
					}
		if(texteemail = file('modules/carnet/emailajax.php?'+lien))
		{
			//alert(texteemail);
			if(texteemail=='nok') {
				
				voir('ficheemail'); 
					
				
				}
		
			
			
		}
		
}
function emaili(){

//	alert(lien);
		
		if(texteemail = file('modules/carnet/emailajax.php?las=ok&emailvisiteur='+document.getElementById('emailcarnet').value))
		{
			//alert(document.getElementById('emailcarnet').value);
			//alert(texteemail);
			//writedivlien('laficheemail',texteemail);
			cache('ficheemail');
			//return texteemail;
		}
}


var t;			

	t = 1;


	function changerTaille(modif) {

		t = t + eval(modif);

		document.getElementsByTagName("body")[0].style.fontSize = t + "em";		
		

	} 	
/**************************** fin agrandir texte*****************************/



// JavaScript Document
// remove the registerOverlay call to disable the controlbar
hs.registerOverlay({
	thumbnailId: null,
	overlayId: 'controlbar',
	position: 'top right',
	hideOnMouseOut: true
});

hs.graphicsDir = 'includes/highslide/graphics/';
overlayId: 'controlbar',
    hs.captionId = 'the-caption';
    hs.outlineType = 'rounded-white';
	hs.captionEval = 'this.thumb.title';
function ouvrelien(lien){
window.open(lien,'_blank','width=500,height=500');
}
function writedivlien(qui,texte)
{

	document.getElementById(qui).innerHTML = texte;
}
function voirphotolien(lien,titre)
{

	//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)
{
	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();
    });
};
function file(fichier)
{
if(window.XMLHttpRequest) // FIREFOX
xhr_object = new XMLHttpRequest();
else if(window.ActiveXObject) // IE
xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
else
return(false);
//xhr_object.readyState=0;
xhr_object.open("GET", fichier, false);
xhr_object.send(null);
if(xhr_object.readyState == 4) return(xhr_object.responseText);
else return(false);


}


