// JavaScript Document

function survolImage(id, image){
	window.document.images[id].src="images/"+image+".jpg";
}

function chImg(ceObj, ceEtat){
	
	if(document.layers){
		ceObj.src=document.mesImages.document.images[ceObj.name+'_'+ceEtat].src;
	}
	else{
		//alert(document.images[ceObj.name+'_'+ceEtat].src);
		ceObj.src=document.images[ceObj.name+'_'+ceEtat].src;
		//alert(ceObj.src);
	}
}


function setEpub() {
	var epubs	= new Array('1.swf', '2.swf');
	var rep 	= 	'flash/epub/';
	var i 		= 	Math.round(Math.random()*(epubs.length-1));
	return rep+epubs[i];
}


function voletAgir(elementClick)
{
    var tabData = new Array;
	// créer autant d'item que de tableaux
    tabData[0] = "rub1";
    tabData[1] = "rub2";
    tabData[2] = "rub3";
 
  for(var i=0; i<tabData.length; i++)
  {
	// changement du style DISPLAY de l'élément nomé tb_' + tabData[i] à masqué
	alert('tb_' + tabData[i]);
	//alert(tabData[i]+""+eval("document.getElementById('tb_' + tabData[i]).style.display = 'none'"));
	eval("document.getElementById('tb_' + tabData[i]).style.display = 'none'");
	
	 // gestion changement d'image d'arrière plan sur le l' élément qui affiche ou masque le tableau, si necessaire
	//document.getElementById('tb_' + tabData[i]).style.backgroundImage = "url("+document.getElementById("NomImage_off").src+")";
	
	// changement de style sur le l' élément qui affiche ou masque le tableau, si necessaire
	//document.getElementById(tabData[i]).className= "sommaire_off";
	
  }
  // changement du style DISPLAY de l'élément nomé tb_' + tabData[i] à visible
  eval("document.getElementById('tb_' + elementClick).style.display = 'block'");
  
   // gestion changement d'image d'arrière plan si necessaire
	//document.getElementById(elementClick).style.backgroundImage = "url("+document.getElementById("NomImage_on").src+")";
	
	// changement de style sur le l' élément qui affiche ou masque le tableau, si necessaire
	//document.getElementById(elementClick).className = "sommaire_on";
}

function OpenCenterPopUp(mon_fichierhtml, width, height, nompopup){	
	var left=window.screen.width/2-175;
	var top=window.screen.height/2-175;
	//Videment faut modifier la config!!
	//var configuration="width='"+width+"', height='"+height+"', left='" + left+"', top='" + top+"'";
	/*toolbar='no', menubar='no', location='no', directories='no', status='no', resizeable='no', scrollbars='yes', */
	window.open(mon_fichierhtml,nompopup,"width="+width+",height="+height+",left="+left+",top="+top+", scrollbars=yes");

	//window.open(mon_fichierhtml,nompopup, ""+configuration+"");
	alert(mon_fichierhtml+"//"+nompopup+"//"+"width="+width+",height="+height+",left="+left+",top="+top+"");
}



function popup(url, titre, largeur, hauteur, scroll) 

  {
  window.open(url, titre, 'width=' + largeur + ', height=' + hauteur + ', scrollbars=' + scroll +',resizeable=no');

  }
  


