//copyleft 2001 Jean-Michel Blondeau jmb@voir.net
function PopUp(adresse,fenetre,x,y,redim,ascen,menu,outil,secteur,adres,etat,cadre) {
posX=screen.availWidth-80;posY=screen.availHeight-80;
var arg = "";
 ha = 0;  la = 0;
	arg = arg + "width=" +x;
	arg = arg + ",height=" + y;
	arg = arg + ",resizable=" + redim;
	arg = arg + ",scrollbars=" + ascen;
	arg = arg + ",menubar=" + menu;
	arg = arg + ",toolbar=" + outil;
	arg = arg + ",locectories=" + secteur;
	arg = arg + ",location=" + adres;
	arg = arg + ",status=" + etat;
var loc=cadre;
if (loc=="bg") {ha=posY-y; la = 0}
else if (loc=="bc") {ha=posY-y; la = (posX-x)/2}
else if (loc=="bd") {ha=posY-y; la= posX-x}
else if (loc=="mg") {ha= (posY-y)/2; la = 0}
else if (loc=="mc") {ha= (posY-y)/2; la = (posX-x)/2}
else if (loc=="md") {ha= (posY-y)/2; la= posX-x}
else if (loc=="hg") {ha=0; la = 0}
else if (loc=="hc") {ha=0; la = (posX-x)/2}
else if (loc=="hd") {ha=0; la= posX-x}
	arg += ",screenX=" + la + ",left=" + la;
	arg += ",screenY=" +ha + ",top=" + ha;

window.open(adresse,fenetre,arg);
}