// affiche.js              
// saint-lary-guide.com 
// Bidouilleur : P. Anjou 
// janvier 2002        
function doOutline() {
  var srcId, srcElement, targetElement,str,str2,i;
  srcElement = window.event.srcElement;
   i=0;
  //alert (srcElement);
  if (srcElement.className.toUpperCase() == "ACTU") {
   srcID = srcElement.id.substr(0, srcElement.id.length-1);
	    // alert(srcID);
		 targetElement = document.all(srcID + "s");
		 srcElement = document.all(srcID + "i");
 for (i=0;document.all("ACTU"+i+"s");i++) {
   // while(i<13) {
	   //alert("ici");
	   str =document.all("ACTU"+i+"s");
	   str2 =document.all("ACTU"+i+"i");
	   // alert("ACTU"+i+"s");
	   if ((str.id == targetElement.id) || (str.id ==  str2.id))
	   { 
	       if (targetElement.style.display == "none") 
	       {
		      targetElement.style.display = "";
			  str2.src ="images/dossier_on.gif";
		   }
	       else 
	       {
		      targetElement.style.display = "none";
			  str2.src ="images/dossier_off.gif";
		   }
	   }
	   else
	   {
	     //  str.style.display ="none";
		   //str2.src ="images/dossier_off.gif";
	   }
	 //  i++;
	}
  }
}


/* repli tous les layers */
function doClose() {
  var srcId, srcElement, targetElement,str,str2,i;
  srcElement = window.event.srcElement;
   i=0;
  //alert (srcElement);

   srcID = srcElement.id.substr(0, srcElement.id.length-1);
	    // alert(srcID);
		 targetElement = document.all(srcID + "s");
		 srcElement = document.all(srcID + "i");
 for (i=0;document.all("ACTU"+i+"s");i++) {
   // while(i<13) {
	   //alert("ici");
	   str =document.all("ACTU"+i+"s");
	   str2 =document.all("ACTU"+i+"i");
	   // alert("ACTU"+i+"s");
	
	       str.style.display ="none";
		 str2.src ="images/dossier_off.gif";
	   
	}
  
}
/* fin de repli */ 
function doOpen() {
  var srcId, srcElement, targetElement,str,str2,i;
  srcElement = window.event.srcElement;
   i=0;
  //alert (srcElement);

   srcID = srcElement.id.substr(0, srcElement.id.length-1);
	    // alert(srcID);
		 targetElement = document.all(srcID + "s");
		 srcElement = document.all(srcID + "i");
 for (i=0;document.all("ACTU"+i+"s");i++) {
   // while(i<13) {
	   //alert("ici");
	   str =document.all("ACTU"+i+"s");
	   str2 =document.all("ACTU"+i+"i");
	   // alert("ACTU"+i+"s");
	
	       str.style.display ="";
		 str2.src ="images/dossier_on.gif";
	   
	}
  
}


function actLine(no) {
var srcId;
   var target;
    alert(no.id);
    srcID = no.id.substr(0, no.id.length-1);
	
	  target = document.all(srcID+"s");
	  if (target.style.display =="none"){ target.style.display ="";}
	  else { target.style.display ="none";}
}

function init(){

	document.onclick = doOutline;
	
}


		init();				
	