var activationImage;

function foo() {
// fonction qui ne fait rien
}

function afficher(modele,nom,id) {
	var temp = new test(nom,'images/fleche_on.gif','images/fleche_off.gif');
	obj = document.getElementById(modele)
	if (obj.style.display == "none") {
          obj.style.display = "inline";
          raz(temp,0);
          jsrsExecute(localisationServlet, foo, "setVu", id);
          }
	else {
          obj.style.display = "none";
          affiche(temp,0);
          }
}



function affiche(bouton,image){
	if(image == 0){
      document.images[bouton.nomImg].src = bouton.nomImg.img2.orig;
      }
}

function raz(bouton,image){
	if(image == 0 && activationImage != bouton.nomImg ){
      document.images[bouton.nomImg].src = bouton.nomImg.img1.orig;
      }
}


function test(image,off,on){
	this.nomImg = new Object(image);
	this.nomImg.factor = imageFactory;
	this.nomImg.factor(off,on,'');

}

function imageFactory(off,on){
	this.img1 = new Image();
    this.img1.orig = off;
	this.img2 = new Image();
	this.img2.orig = on;

	}

function afficher2(modele,nom) {
	var temp = new test(nom,'images/fleche_on.gif','images/fleche_off.gif');
	obj = document.getElementById(modele)
	if (obj.style.display == "none") {
          obj.style.display = "inline";
          raz(temp,0);
          }
	else {
          obj.style.display = "none";
          affiche(temp,0);
          }
}



