function openresolWin(fullimage,resolwidth,resolhigh,linkpoeme) {

	ratio = resolwidth / resolhigh;
	//alert(ratio);
	picx = resolwidth;
	picy = resolhigh;
	reducx = resolwidth;
	reducy = resolhigh;
	resolwidth = resolwidth + 16;
	resolhigh = resolhigh + 16;

	allowzoom = 0;
	rebord = 112;

	if ((resolwidth < screen.availWidth)&&((resolhigh + rebord) < screen.availHeight)) {
		var resolw=resolwidth;
		var resolh=resolhigh;
		//alert('res.image' + resolw + ' ' + resolh)
		myWin= open('', 'displayWindow','width='+resolwidth+',height='+resolhigh+',status=no,toolbar=no,menubar=no,titlebar=no');
	}
	else {
		var resolw=screen.availWidth;
		var resolh=screen.availHeight;
		//alert('res.ecran ' + resolw + ' ' + resolh)
		if (ratio > 1) {
			reducx = resolw - rebord ;
			reducy = (resolw - rebord) / ratio;
		}
		if (reducy > (resolh - rebord)) {
			reducx = (resolh - rebord) * ratio;
			reducy = (resolh - rebord);
		}
		myWin= open('', 'displayWindow','width='+resolw+',height='+resolh+',status=no,toolbar=no,menubar=no,titlebar=no,scrollbars=yes');
		allowzoom = 1;
	}
	reducx = Math.round(reducx);
	reducy = Math.round(reducy);
	//alert('reduc = ' + reducx + ' ' + reducy + ' ' + allowzoom)

	// open document for further output
	//myWin.document.open();

	// create document
	myWin.document.write('<html><head><title>pleine image : '+fullimage+'</title>');
	myWin.document.writeln('<style type="text/css">');
	myWin.document.writeln('<!--');
	myWin.document.writeln('body {font-family:arial,helvetica,tachoma,verdana,sans-serif; font-size:12pt; color:#ffffff; font-style:normal}');
	myWin.document.writeln('-->');
	myWin.document.writeln('</style>');
	myWin.document.writeln('<SCRIPT language="JavaScript">');
	myWin.document.writeln('<!--');
	myWin.document.writeln('window.moveTo(0,0);');
	//myWin.document.writeln('window.resizeTo(screen.availWidth,screen.availHeight);');
	if ( allowzoom == 1 ) {

		myWin.document.writeln('sizeswitch = 0');
		myWin.document.writeln('function resize() {');
		myWin.document.writeln('	if (sizeswitch == 0) {');
		myWin.document.writeln('		sizeswitch = 1;');
		myWin.document.writeln('		document.getElementById('+"'"+'picture'+"'"+').innerHTML='+"'"+'<img src="' + fullimage + '" style="cursor: url('+"'"+'+"'+"'"+'"+'+"'unzoom.cur"+"'"+'+"'+"'"+'"+'+"'"+'), pointer" width='+picx+' height='+picy+' border=0 onClick="resize()" onDblClick="window.close()">'+"';");
		//myWin.document.writeln('		alert(sizeswitch);');
		myWin.document.writeln('	}');
		myWin.document.writeln('	else {');
		myWin.document.writeln('		sizeswitch = 0;');
		myWin.document.writeln('		document.getElementById('+"'"+'picture'+"'"+').innerHTML='+"'"+'<img src="' + fullimage + '" style="cursor: url('+"'"+'+"'+"'"+'"+'+"'zoom.cur"+"'"+'+"'+"'"+'"+'+"'"+'), pointer" width='+reducx+' height='+reducy+' border=0 onClick="resize()" onDblClick="window.close()">'+"';");
		//myWin.document.writeln('		alert(sizeswitch);');
		myWin.document.writeln('	}');
		myWin.document.writeln('}');
	}
	if (linkpoeme != "") {
		myWin.document.writeln('function popoeme(urlpoeme) {');
		myWin.document.writeln('  powin = open(urlpoeme, "poeme","width=600,height=600,status=no,toolbar=no,menubar=no,titlebar=no,scrollbars=yes");');
		myWin.document.writeln('}');
		myWin.document.writeln('-->');
	}
	myWin.document.writeln('-->');
	myWin.document.writeln('</SCRIPT>');
	myWin.document.writeln('</head><body bgcolor="#352f2f">');
	myWin.document.writeln('<center>');
	myWin.document.writeln('<span id="picture" onDblClick="window.close()">');
	if ( allowzoom == 1 ) {
		myWin.document.writeln('<img src="'+fullimage+'" style="cursor: url('+"'"+'zoom.cur'+"'"+'), pointer" width='+reducx+' height='+reducy+' border=0 onClick="resize()" onDblClick="window.close()">');
	}
	else {
		myWin.document.writeln('<img src="'+fullimage+'" width='+reducx+' height='+reducy+' border=0 onDblClick="window.close()">');
	}
	myWin.document.writeln('</span>');
	if (linkpoeme != "") {
		myWin.document.writeln('<p><a href="javascript:popoeme('+"'poemes/"+linkpoeme+'.html'+"'"+')">'+linkpoeme+'</a>');
	}
	//myWin.document.writeln("<p><p><font size=1>Double-cliquer sur l'image pour la fermer, SVP</font>");
	myWin.document.writeln('</center>');
	myWin.document.writeln('</body></html>');

	// close the document - (not the window!)
	myWin.document.close();
}

