/* auteur: PIXILOG */
/* Date de création: 09/08/2007 */ 
// Initialisation des variables
var flag = false;			// etat de la fenetre
titre = "";					// titre
W = 0;						// Largeur fenêtre
H = 0;						// hauteur
imgUrl = "";				// url de l'img à afficher

function popupZoom(type,id,titre,archi,H,W)
{
	if (flag) { 							// Vérification de l'état de la fenêtre zoom (si flag est vrai, elle est ouverte)
		zoom.close();						// fermer la fenêtre
		ouvrePopup(type,id,titre,archi,H,W);		// ouvrir une nlle fenêtre
	} else {
		ouvrePopup(type,id,titre,archi,H,W);
	}
}
function ouvrePopup(type,id,titre,archi,H,W)
{		
		imgW=W;			// largeur de l'image est égale à celle de la fenêtre
		imgH=H;			// hauteur de l'image est 25 px de moins (pour placer la console en bas de fenêtre)
		popupH = H+50
		popupW = W+10
		
		
		// Redimensionne le Popup à 800 px de haut et à W+25 px de large (pour annuler le scroll horizontal)
		if (H > 600) {
		
			popupH=600;
			popupW=W+25;
		}
		if (W < 420) {
		
			popupH=H+50;
			popupW=430;
		}
		
		zoom=window.open('','ZoomImg','toolbar=no,menubar=no,top=0,left=0,location=no,height='+popupH+',width='+popupW);
		zoom.resizeTo(popupH,popupW);
		zoom.document.write ("<html><head><meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'><title>"+titre+"</title>");
		zoom.document.write ("</head>");
		zoom.document.write ("<body style=\"background-color:white; padding:10px\" scroll=\"yes\">");
		zoom.document.write ("<div style=\"width:"+popupW+"px; height"+popupH+"px; background-color:blue;\">  H="+popupH+"<br>W="+popupW+"");
		zoom.document.write ("<p><img src='data/imgZ/"+type+"_00"+id+"z.jpg' border='1'alt='' width='"+imgW+"' height='"+imgH+"'></p>");
		/* Renseignements
		zoom.document.write ("<p><b>"+titre+"</b><br><i>"+archi+"</i></p><br>");
		// Btn Close
		zoom.document.write ("<div style=\"text-align: center\"><a href='#' target='_self' onClick='window.close()'>");
		zoom.document.write ("<img src='img/BtnClose_Off.jpg'border='0' width='45' height='18' alt=''");
		zoom.document.write ("onMouseOver=\"this.src='img/BtnClose_On.jpg'\" ");
		zoom.document.write ("onMouseOut=\"this.src='img/BtnClose_Off.jpg'\">");
		zoom.document.write ("</a></div>");
		zoom.document.write ("</div></body>");
		zoom.document.write ("</html>");
		//location.reload(); 
		flag=true; 			// Mémoriser l'état fenêtre zoom = ouverte
		zoom.focus();		// passe le popup devant l'écran 
		*/
}
	

