// ouverture d'une pop-up
function OpenWindow(theURL, scrolls, theWIDTH, theHEIGHT)
{
	// un seul paramètre : appel par défaut pas de scrollbars
	if (scrolls == undefined && theWIDTH == undefined && theHEIGHT == undefined) {
		var top = (screen.height - 310) / 2;
		var left = (screen.width - 265) / 2;
		window.open(theURL,'','scrollbars=no,top='+top+',left='+left+',width=265,height=310');
	}
	
	// deux paramètres : appel par défaut avec scrollbars
	else if (scrolls != undefined && theWIDTH == undefined) {
		var top = (screen.height - 310) / 2;
		var left = (screen.width - 265) / 2;
		window.open(theURL,'','scrollbars=yes,top='+top+',left='+left+',width=265,height=310');
	}

	// trois paramètres : dimension manquante
	else if (theWIDTH != undefined && theHEIGHT == undefined) {
		document.write('Erreur ouverture pop-up : paramètre manquant.');
	}

	// quatre paramètres : redéfinition de la taille
	else {
		var top = (screen.height - theHEIGHT) / 2;
		var left = (screen.width - theWIDTH) / 2;
		window.open(theURL,'','scrollbars='+scrolls+',top='+top+',left='+left+',width='+theWIDTH+',height='+theHEIGHT);
	}
}
