var WindowObjectReference = null;
function Onbw(theURL,winName,features, myWidth, myHeight, isCenter) {
	//if(WindowObjectReference == null || WindowObjectReference.closed) {		
		if (features == "all=yes")
			features = 'directories=yes,location=yes,menubar=yes,resizable=yes,scrollbars=yes,status=yes,toolbar=yes,';
		else
			features += (features!='') ? ',' : '';
		if(window.screen) if(isCenter) if(isCenter=="true") {
			features += 'left=' + ((screen.width-myWidth)/2) + ',top=' + ((screen.height-myHeight)/2);
		}
		else
			features += isCenter;
		WindowObjectReference = window.open(theURL,winName,features + ((features!='') ? ',' : '') + 'width=' + myWidth + ',height=' + myHeight);
		WindowObjectReference.focus();
	/*}
	else
		WindowObjectReference.focus();*/
}

function popup_image(chemin, largeur, hauteur) {
	var features = "", sMod = "fixe"; // TODO : n'est plus utilisé (largeur, hauteur inutile aussi)

	largeur = largeur || '';
	hauteur = hauteur || '';
	if (largeur == "" || hauteur == "") {
		sMod = "popup";
		largeur = 200;
		hauteur = 200;
	}	
	Onbw(chemin.replace('affiche=page','affiche=' + sMod),'',features+'resizable=1,status=1,scrollbars=1',largeur,hauteur,'');
}