// JavaScript Document
<!--

//POPUP
function popup(page,nom,option) {
    var w=window.open(page,nom,option);
	w.document.close();
    w.focus();
}


//Afficher / masquer les DIV
function visibilite(thingId)
{
var targetElement;
targetElement = document.getElementById(thingId) ;
if (targetElement.style.display == "none")
{
targetElement.style.display = "" ;
} else {
targetElement.style.display = "none" ;
}
}




// Fonction de rollover
function rollover_tjs(nom,i,src) {	
	document.images[nom].src=src;

var long = document.images[nom].width;
//alert(long);

if(long>600){
	document.images[nom].width = 600;
} else {
	document.images[nom].width = long;
}
/*
	img = new Image();
	img.src = src;
	var long = img.width;
	if (img.width > 600){
		//alert('img too big');
		this.width = 600;
	}else{
		document.images[nom].width = long;
	}

	
	var long = document.images[nom].width;
	var haut = document.images[nom].height;
	var ratio = long/haut;
	if(long>600){
	  alert(long);
	  document.images[nom].width = 600;
	  document.images[nom].height = 600/ratio;
	}
	*/
}

// Fonctions de préload
function load() {
	if (document.images) {
		this.length=load.arguments.length;
		for (var i=0;i<this.length;i++) {
			this[i+1]=new Image();
			this[i+1].src=load.arguments[i];
		}
	}
}
//-->