// JavaScript Document
function expand(id)
{
     var item  = document.getElementById(id);
     if( item.style.visibility == 'hidden' )
     {
         item.style.visibility = 'visible';
         item.style.position   = '';
 
         
     }
     else
     {
         item.style.visibility = 'hidden';
         item.style.position   = 'absolute';
     }
     return false;
}

function change(nom,obj_im) { 
	if (document.images){
	 document.images[nom].src=obj_im
	}
var hscroll = (document.all ? document.scrollLeft : window.pageXOffset);
var vscroll = (document.all ? document.scrollTop : window.pageYOffset);

window.scrollTo(hscroll, vscroll);	
} 



function affichage_popup(nom_de_la_page, nom_interne_de_la_fenetre)
{
alert(nom_de_la_page);
//window.open (nom_de_la_page, nom_interne_de_la_fenetre)
}




 function popupcentree(page,largeur,hauteur,options) {    
	var top=(screen.height-hauteur)/2;    
	var left=(screen.width-largeur)/2; 
	
	var  tableau=page.split("/");
	var taille =tableau.length;
	var pageres = "image.php?image="+tableau [taille-1];
	window.open(pageres,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
 }

function ImageMax(img,images)  {

	titre="Agrandissement"; 
	w=open("",'image','width='+images.width+',height='+images.height+',toolbar=no,scrollbars=no,resizable=no,top=100,left=100'); 
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>"); 
	w.document.write("<SCRIPT language=javascript>function checksize() { if (document.images[0].complete) { window.resizeTo(document.images[0].width+10,document.images[0].height+30); window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>"); 
	w.document.write("<BODY onload='checksize()' onblur='window.close()' onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
	w.document.write("<TABLE width='100%' border='0' cellspacing='0' cellpadding='0' height='100%'><TR>");
	w.document.write("<TD valign='middle' align='center'><IMG src='"+img+"' border=0 alt='Mon image'>"); 
	w.document.write("</TD></TR></TABLE>");
	w.document.write("</BODY></HTML>"); 
	w.document.close(); 
}


