// V 2.2 | 06.18.2004

var xWin= null;
function xPopup(xPage,xWidth,xHeight,xWinName,xLeft,xTop,xFeatures){
	var xWinLeft;
	var xWinTop;
	(xLeft!=null)?xWinLeft=xLeft : xWinLeft=(screen.width-xWidth)/2;
	(xTop!=null)?xWinTop=xTop : xWinTop=(screen.height-xHeight)/2;
	xSettings='width='+xWidth+',height='+xHeight+',top='+xWinTop+',left='+xWinLeft+','+xFeatures+'';
	xWin=window.open(xPage,xWinName,xSettings);
	if (xWin.oParent == null) xWin.oParent = self;
	if(xWin!=null || xWin != undefined){if(parseInt(navigator.appVersion) >= 4){xWin.window.focus();}}
}

// note: 
//	Si 'xLeft' et 'xTop' ont une valeur de null, le popup est automatiquement centré dans le browser. 
// exemple de lien:
// <a href="javascript:xPopup('xPage','300','200','xWinName',100,100,'scrollbars=no,toolbar=no,location=no,status=no,menubar=no,resizable=no,dependent=no')">Popup code</a>