function PopupImage(image) {
// paramètres

titre="";
texte="Cliquer pour fermer cette fenêtre"
imgtitle="Cliquer pour fermer"
alt="Image agrandie, cliquer pour fermer"
style="./popup.css" // ici l'adresse de la css


imagechien = new Image( );
imagechien.src = image

var h = 500; // hauteur initiale imagechien.height
var l = 500; // largeur initiale imagechien.width
var mh = 100; // marge horizontale(haut+bas)
var mv = 20; // marge verticale(gauche+droite)
var ln = 10; // largeur chrome (gauche+droite) explorer
var hn = 30; // hauteur chrome (haut+bas) explorer

// calcul position et taille de la fenêtre mère

var lfm,hfm,hautfm,gauchefm;
//if (typeof self.innerHeight != 'undefined') // Gecko & DOM
//{
//    ln2 = self.outerWidth-document.body.offsetWidth; // largeur chrome + ascenseur s'il y a
//    hn2 = self.outerHeight-self.innerHeight; // hauteur chrome + barres d'outils
//    hautfm = self.screenY; // haut de la fenêtre mère
//    gauchefm = self.screenX; // gauche de la fenêtre mère
//    lfm = self.outerWidth-ln2; // largeur la fenêtre mère
//    hfm = self.innerHeight+hn2; // hauteur de la fenêtre mère
//}
//else if (typeof document.documentElement != 'undefined' && document.documentElement.clientHeight != 'undefined') // Explorer 6 Strict Mode
//{
//    hautfm = window.screenTop;
//    gauchefm = window.screenLeft;
//    lfm = document.documentElement.clientWidth-ln;
//    hfm = document.documentElement.clientHeight-hn;
//}
//else if (typeof document.body != 'undefined') // autres Explorers
//{
    hautfm = window.screenTop;
    gauchefm = window.screenLeft;
    lfm = document.body.clientWidth-ln;
    hfm = document.body.clientHeight-hn;
//}
// construction de la popup

var PosX = Math.round(( hfm - h ) / 2)+hautfm;
var PosY = Math.round(( lfm - l ) / 2)+gauchefm;
var option = "resizable,toolbar=no,scrollbars=no,top="+PosX+",left="+PosY+",width="+l+",height="+h+"";
w=open('popup.html',"titre",option);
w.document.write("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>");
w.document.write("<html xmlns='http://www.w3.org/1999/xhtml'>");
w.document.write("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />");
w.document.write("<html><head><title>"+titre+"</title></head>");
w.document.write("<link href='"+style+"' rel='stylesheet' type='text/css' />");
w.document.write("<script type=text/javascript>function checkSize() { if (document.images['img'].height > 1) { window.resizeTo(document.images['img'].width+"+ln+"+"+mv+",document.images['img'].height+"+hn+"+"+mh+")} else { setTimeout('checksize()',250) } }</"+"script>");
w.document.write("<script type=text/javascript>function centerPopup() { window.moveTo(Math.round(("+lfm+"-(document.images['img'].width+"+mv+"))/2)+"+gauchefm+",Math.round(("+hfm+"-(document.images['img'].height+"+mh+"))/2)+"+hautfm+");}</"+"script>");
w.document.write("<body onload='checkSize();centerPopup()' onblur='window.close()' onclick='window.close()'>");
w.document.write("<div class='cadreh'></div><div class='cadreg'></div><div class='cadrec'><img src='"+image+"' name='img' class='image' alt='"+alt+"' title='"+imgtitle+"'></div><div class='cadred'></div><div class='cadreb'><div class='legende'>"+texte+"</div></div>");
w.document.write("</body></html>");
w.document.close();
}