function PopupImage(img) {
	titre="Zoom";
	w=open("","",'width=400,height=400,toolbar=no,scrollbars=no,resizable=no');	
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>");
	//w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images['sary'].complete) {  if(document.images['sary'].width+12<750){window.resizeTo(document.images['sary'].width+12,document.images['sary'].height+30); window.focus();}else{window.resizeTo(750,400); window.focus();}} else { setTimeout('checksize()',500) } }</"+"SCRIPT>");
	w.document.write("<BODY onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><IMG name='sary' src='"+img+"' border=0>");
	w.document.write("");
	w.document.write("</BODY></HTML>");
	w.document.close();
}

function MM_openBrWindow3(theURL,winName,features,position) { //v2.0	

   	ref = window.open(theURL,winName,features);

	var windowX = (screen.width - position)/2;

	ref.moveTo(windowX,0);

	ref.focus();

}



function checksize()  { 

	if (document.images['myImg'].complete){  
      largeur = screen.width-50;
	  hauteur = screen.height-200;
	  if (document.images['myImg'].width+36 < screen.width){
	    largeur = document.images['myImg'].width+36;
      }
	  if (document.images['myImg'].height+90 < screen.height){
		hauteur = document.images['myImg'].height+90;
	  }
	  window.resizeTo(largeur, hauteur);
      var windowX = (screen.width - document.images['myImg'].width+16)/2;
	  window.moveTo(windowX,0);
      window.focus();
	}else{ 
		setTimeout('checksize();',500);
	} 
}



/*
function checksize(imgName)  { 
	alert(imgName);
	alert(document.images[imgName]);
	if (document.images[imgName].complete){  
		window.resizeTo(document.images[imgName].width+12, document.images[imgName].height+30); 
		window.focus();
	}else{ 
		setTimeout('checksize('+imgName+');',500);
	} 
}
*/
/*
function checksize(imgName)  { 
	alert(imgName);
//	alert(document.images[imgName]);
	if(isobject(imgName) && imgName.complete){  
		window.resizeTo(imgName.width+12, imgName.height+30); 
		window.focus();
	}else{ 
		setTimeout('checksize('+imgName+');',500);
	} 
}
*/
