function popupImageResize(img,titre,largeur,hauteur,chemin) {
 
 // declatation des variables
 
 var titre;
 var chemin;
 var chemin;
 var largeur;
 var hauteur;
 
  // Declarations de la taille maxi autorisee
 
  // largeur
 var maxWidth = 1000;
 
 // hauteur
   var maxHeight = 650;
 
  // Declarations des variables "Nouvelle Taille"
 
   var dW = 0;
   var dH = 0;
 
 // Declaration d'un objet Image
 
   var oImg = new Image();
 
 // Affectation du chemin de l'image a l'objet
 
   oImg.src = chemin+img;
 
 // On recupere les tailles reelles de l'image
 
   var h = dH = hauteur;
   var w = dW = largeur;
 
  // Si la largeur ou la hauteur depasse la taille maximale
 
    if ((h >= maxHeight) || (w >= maxWidth)) {
    
 // Si la largeur et la hauteur depasse la taille maximale
 
       if ((h >= maxHeight) && (w >= maxWidth)) {
      
 // On cherche la plus grande valeur
 
    if (h > w) {
            dH = maxHeight;
        
 // On recalcule la taille proportionnellement
            dW = parseInt((w * dH) / h, 10);
      
 
    } else {
        
    dW = maxWidth;
        
 // On recalcule la taille proportionnellement
        
    dH = parseInt((h * dW) / w, 10);
          }
       } else if ((h > maxHeight) && (w < maxWidth)) {
      
 // Si la hauteur depasse la taille maximale
      
   dH = maxHeight;
        
 
 // On recalcule la taille proportionnellement
         
   dW = parseInt((w * dH) / h, 10);
    
   } else if ((h < maxHeight) && (w > maxWidth)) {
      
 // Si la largeur depasse la taille maximale
      
   dW = maxWidth;
       
  // On recalcule la taille proportionnellement
      
   dH = parseInt((h * dW) / w, 10);
 
   }
 
 
  }
 

 // caracteristiques de la popup 
 

 w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=no,top=0,left=0'); 
 w.document.write("<HTML>\n<HEAD>\n<TITLE>"+ titre +"</TITLE>\n");
 w.document.write("</HEAD>");
 w.document.write("<SCRIPT language=javascript>\n function checksize()  {\n if (document.images[0].complete) {\n  window.resizeTo(document.images[0].width+20,document.images[0].height+90);\n window.focus();\n}\n else {\n setTimeout('check()',250)\n \t}\n}\n</"+"SCRIPT>\n");
 w.document.write("<BODY onload='checksize()' onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
 // contenu de la popup
 //w.document.write("<form action='../script_site/telecharger.php' method='post' name='form_"+img+"'>");
 w.document.write("<table width='100%' border='0' cellspacing='0' cellpadding='0'>\n");
 w.document.write(" <tr>\n\t<td><center><img src='"+chemin+img+"' width=\"" + dW + "\" height=\"" + dH + "\" border=\"0\"></center></td>\n</tr>\n");
 w.document.write("</table>\n");
 //w.document.write("</form>"); 
 //----------------------------------------
 w.document.write("</BODY>\n</HTML>");
 w.document.close();
}

function ouvre_pop(a){
	var haut=(screen.height-120)/2;
	var Gauche=(screen.width-400)/2;
	
	w=open("confirm.php?id="+a+"",'image','width=400,height=120,toolbar=no,scrollbars=no,resizable=no,top='+haut+',left='+Gauche+''); 
}
