function popup(page) {
     window.open(page,'popup','width=580,height=400,scrollbars=1,resizable=1'); 
}

function popup2(page2) {
	window.open(page2,'popup','width=300,height=200,scrollbars=0,resizable=0,top=10,left=10'); 
}

function PopupImage(img) {
	titre="copie ecran";
	w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=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+12,document.images[0].height+30); window.focus();} else { setTimeout('check()',250) } }</"+"script>");
	w.document.write("<body onload='checksize()' onblur='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><img src='"+img+"' alt='' />");
	w.document.write("");
	w.document.write("</body></html>");
	w.document.close();
}

function neWindow(url,confirmation,message,nom,feature){
	if(message == undefined || message == '') message = 'ouverture dans une nouvelle fenetre.';
	if(confirmation == true && !window.confirm(message)) return true;
	if(typeof(url)!="string"){
		url.target = "_blank";
		return true;
	}
	else{
		if(nom == undefined) nom = 'w'+new Date().getTime();
		if(feature == undefined) feature = 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes';
		window.open(url,nom,feature);
		return false;
	}
}