function PopupImage(image) {
// paramètres 

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


var h = 0; // hauteur initiale
var l = 0; // largeur initiale
var mh = 55; // marge horizontale(haut+bas)
var mv = 30; // marge verticale(gauche+droite)
var ln =0 ; // largeur chrome (gauche+droite) explorer
var hn =0; // 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=no,toolbar=no,scrollbars=no,top="+PosX+",left="+PosY+",width="+l+",height="+h+"";
w=open('',"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() </"+"script>");
w.document.write("<body bgcolor='#000000' 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(); 
} 

