/***********************************************************/
/* fichier : fonctions.js                                  */
/*                                                         */
/* auteur  : Ludovic Mauris                                */
/*                                                         */
/* date    : 12.08.2006                                    */
/*                                                         */
/* but     : Fonctions JS en tout genre                    */
/*                                                         */
/***********************************************************/
function preload(p_Img){
	p_Img = new Image();
	p_Img.src = 'images/'+p_Img;
}

function change_image(img_nom,img_src) { 
	document[img_nom].src = img_src;
}

function popup_photo(sPicURL) { 
	window.open( 'popupPhotos.php?'+sPicURL, '', 'top=0,left=0,height=200,width=200,directories=0,status=0,scrollbars=0,resizable=0,menubar=0');
}

function popup(p_Page,p_Largeur,p_Hauteur) {
	var fenetre_param='left=0,top=0,directories=no,status=no,scrollbars=no,resizable=no,menubar=no,width='+p_Largeur+',height='+p_Hauteur;
	fenetre_fiche = window.open(p_Page,'',fenetre_param);
	fenetre_fiche.focus();
}

function changeImageGalerie(img_src) {

	imageAC.width = 350;
	imageAC.src = './site_graphisme/images/spacer.gif';
	
	load.style.visibility='visible';

	imageAC.src = img_src;
}

function MajImageGalerie() {
	p_Img = new Image();
	p_Img.src = imageAC.src;
	
	load.style.visibility='hidden';
	
	if(p_Img.width > p_Img.height){
		if(p_Img.width < 600){
			imageAC.width = p_Img.width
		}else{
			imageAC.width = 600;
		}
	}else{
		if(p_Img.width < 350){
			imageAC.width = p_Img.width
		}else{
			imageAC.width = 350;
		}
	}
}


