// JavaScript Document

/* popup image */
function PopupImage(img) { 
titre="Agrandissement"; 
w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=no,menubar=no,location=no,status=no'); 
w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>"); 
w.document.write("<SCRIPT language=javascript>function checksize() { if (document.images[0].complete) { window.resizeTo(document.images[0].width,document.images[0].height); window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>"); 
w.document.write("<BODY onload='checksize()' onblur='window.close()' onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
w.document.write("<TABLE width='100%' border='0' cellspacing='0' cellpadding='0' height='100%'><TR>");
w.document.write("<TD valign='middle' align='center'><IMG src='"+img+"' border=0 alt=' Agrandissement '>"); 
w.document.write("</TD></TR></TABLE>");
w.document.write("</BODY></HTML>"); 
w.document.close(); 
} 
/* *********** */



/* popup alert */
function fermer_alert(){	
	document.getElementById("pop_alert").style.display = 'none';
}

function ouvrir_alert(largeur,hauteur){
	document.getElementById("pop_alert").style.display = 'block';
	document.getElementById("pop_alert").style.position = 'fixed';
	document.getElementById("pop_alert").style.background = '#CFCFCF';
	document.getElementById("pop_alert").style.border = '1px solid #CCCCCC';
	document.getElementById("pop_alert").style.width = largeur;
	document.getElementById("pop_alert").style.height = hauteur;
	
	//centrer alert	
  	var margintop=(screen.height-hauteur)/4;
	mm = margintop+"px";
	document.getElementById("pop_alert").style.top = mm;
	
  	var marginleft=(screen.width-largeur)/3;
	mt = marginleft+"px";
	document.getElementById("pop_alert").style.left = marginleft;	
}
/* *********** */
