function popup(url, titre, largeur, hauteur, scroll) 
{
	 window.open(url, titre, 'width=' + largeur + ', height=' + hauteur + ', scrollbars=' + scroll);
} 

numpopup = 1;

function winpopup(URL,width,height)
{
	 if (window.screen.width <= width || window.screen.height <= height) {
		  if (window.screen.width <= width) width = window.screen.width - 5;
		  if (window.screen.height <= height) height = window.screen.height - 30;
		  scrstr = ',scrollbars=1';
	 }
	 else {
	 scrstr = ',scrollbars=0';
	 }

	 width+=20
	 height+=20
	 numpopup++;
	 window.open(URL, 'detail'+numpopup,'status=1,menubar=0,width='+width+',height='+height+',screenX=100,screenY=100'+scrstr);
}