// JavaScript Document
var fenetre;
var fenetre2;
function pop_up(){	
	if(fenetre!=null) fenetre.close();
	fenetre=window.open('','popup','toolbar=0, location=0, directories=0, status=0,  resizable=1, scrollbars=1, height=650,width=650');
}
function pop_redim(nx,ny) {
	xall = (screen.availWidth / 2);
	yall = (screen.availHeight / 2);
	window.resizeTo(nx,ny);
	self.moveTo(xall - (nx / 2), yall - (ny / 2));
	self.focus();
}

function pop_fermer() { 
	opener=self; 
	self.close(); 
} 
function ouvre_ferme(id) {
 var d = document.getElementById(id);
 
 if(d){
  if (d.style.display=='inline') d.style.display='none';    
  else d.style.display='inline';
 }
   
}

function changer_img(id,url,url2) {
 var d = document.getElementById(id);
 
 if(d){
  var a=d.src.split('/');
  var b=url.split('/');
  b=b[2];
  a=a[5]; // si site a la racine , mettre 4 sinon 5
       
   if(a==b){
    d.src=url2; 
    d.alt='Fermer';
	//alert(d.src);
   }
   else {
    d.src=url;
    d.alt='Ouvrir';
   } 
 }//fin id(d)
 
}//fin fonction
