
/* fenêtre popup  */
function NewWindow(url,hauteur,largeur) {
	
/* url = "presse/" + url + ".html"; */
var winl = (screen.width - largeur) / 2;
var wint = (screen.height - hauteur) / 2;
date_t = new Date;
time = date_t.getTime();
winprops = 'height='+hauteur+',width='+largeur+',top='+wint+',left='+winl+',scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no';
win = window.open(url, time, winprops)

	if (!pop) {
    alert("Votre navigateur empêche l'ouverture d'un popup d'information");
  }
}
/* fin fenêtre popup */

/* popup pour les joueurs */

			// CREDITS:
			// Flying Border Popup by Urs Dudli and Peter Gehrig 
			// Copyright (c) 2000 Peter Gehrig and Urs Dudli. All rights reserved.
			// Permission given to use the script provided that this notice remains as is.
			// Additional scripts can be found at http://www.24fun.com.
			// info@24fun.com
			// 12/15/2000

var popwindow
var tisurl
var tiswidth
var tisheight
var thismargin=10
var tistopposition=thismargin
var tisleftposition=thismargin
var pause=20
var step=20
var screenwidth
var screenheight
var endposition_x
var endposition_y
var timer

function openpopup(thisurl,thiswidth,thisheight) {
	tisurl=thisurl
	tiswidth=thiswidth
	tisheight=thisheight

	popwindow=window.open(tisurl, "newwindow", "toolbar=no, scrollbars=yes,width="+tiswidth+",height="+tisheight+",top="+tistopposition+",left="+(tisleftposition)+"");

	screenwidth=window.screen.width
	screenheight=window.screen.height
	endposition_x=screenwidth-thiswidth-thismargin
	endposition_y=screenheight-thisheight-thismargin
	movedown()
}

function movedown() {
	if (tistopposition<=endposition_y-50) {
		popwindow.moveTo(tisleftposition,tistopposition)
		tistopposition+=step
		timer= setTimeout("movedown()",pause)
	}
	else {
		clearTimeout(timer)
		tistopposition=endposition_y-50
		popwindow.moveTo(tisleftposition,tistopposition)
		moveright()
	}
}

function moveright() {
	if (tisleftposition<=endposition_x) {
		popwindow.moveTo(tisleftposition,tistopposition)
		tisleftposition+=step
		timer= setTimeout("moveright()",pause)
	}
	else {
		clearTimeout(timer)
		tisleftposition=endposition_x
		popwindow.moveTo(tisleftposition,tistopposition)
		moveup()
	}
}

function moveup() {
	if (tistopposition>=thismargin) {
		popwindow.moveTo(tisleftposition,tistopposition)
		tistopposition-=step
		timer= setTimeout("moveup()",pause)
	}
	else {
		clearTimeout(timer)
		tistopposition=thismargin
		popwindow.moveTo(tisleftposition,tistopposition)
		moveleft()
	}
}

function moveleft() {
	if (tisleftposition>=thismargin) {
		popwindow.moveTo(tisleftposition,tistopposition)
		tisleftposition-=step
		timer= setTimeout("moveleft()",pause)
	}
	else {
		clearTimeout(timer)
		tisleftposition=thismargin
		popwindow.moveTo(tisleftposition,tistopposition)
	}
}

/* fin popup pour les joueurs */

/* affiche feuilles de match */

							/* AUTEUR: Jean Puelinckx */
							/* DATE DE CREATION: 03/03/00 */
							<!-- Original:  Ronnie T. Moore, Editor -->
timeout =0; // Close window after __ number of seconds?
// 0 = do not close, anything else = number of seconds
function affichefeuilles(URL, WIDTH, HEIGHT) {
windowprops = "left=20,top=0,width=" + (WIDTH+32) + ",height=" + (HEIGHT+40);
text = "<html><head><title>T.T. SAINT-LOUIS - feuilles de match</title></head><body onBlur='window.close();' bgcolor='white'";
if (timeout != 0) text +=" onLoad=\"setTimeout('window.close()', " + timeout*1000 + ");\"";
text += "><center><img src='" + URL + "'>";
if (timeout != 0) text +="<br><font face='arial, helvetica' size='-1'>Fermeture automatique au bout de " + timeout + " secondes.</font>";
text += "</center></body></html>";
preview = window.open("", "preview", windowprops);
preview.document.open();
preview.document.write(text);
preview.document.close();
}

/* fin affiche feuilles de match */

/* affichage photos en popup sur clic vignettes */

child=false;

function done() {
	fenetre.close();
	child = false;
}

function vue(img, titre, texte, w, h) {
	
	i1 = new Image;
	i1.src = img;

	chaine = new String(texte);
	tl = chaine.length;
	
	if (w >= h) {
		if (tl > 2) {
			charsbyline = 92 * w / 600;
			linestoadd = tl / charsbyline;
			linestoadd = Math.round(linestoadd + .5);
			pixtoadd = 26 * linestoadd;
			h = h +pixtoadd;
		}
		if (child==true) fenetre.close();
		fenetre = window.open("","","height="+h+",width="+w+",left=10,top=10,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,directories=no,titlebar=no");
		child = true;
		setTimeout("done()", 60000);
		fenetre.document.write("<html>\r\n<head>\r\n<title>"+titre+"</title>\r\n<style>TD {font-family:Verdana;font-size:10px;color:#336600;text-align:justify;text-valign:top;font-weight: bold;}</style>\r\n</head>\r\n<body onBlur='window.close();' leftmargin='0' marginwidth='0' topmargin='0' marginheight='0' onBlur=\"self.close()\">\r\n<img src=\'"+img+"\'>\r\n<table>\r\n<tr>\r\n<td>"+texte+"</td>\r\n</tr>\r\n</table>\r\n</body>\r\n</html>");
	} else {
		if (tl > 2) {
			lignesdispo = h / 16;
			lignesdispo = Math.round(lignesdispo - .5)
			charsbyline = tl / lignesdispo;
			pixtoadd = charsbyline * 600 / 84;
			if (pixtoadd < 150) { pixtoadd = 200; }
			w = w +pixtoadd;
		}
		if (child==true) fenetre.close();
		fenetre = window.open("","","height="+h+",width="+w+",left=10,top=10,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,directories=no,titlebar=no");
		child = true;
		setTimeout("done()", 60000);
		fenetre.document.write("<html>\r\n<head>\r\n<title>"+titre+"</title>\r\n<style>TD {font-family:Verdana;font-size:10px;color:#336600;text-align:justify;text-valign:top;font-weight: bold;}</style>\r\n</head>\r\n<body leftmargin='0' marginwidth='0' topmargin='0' marginheight='0' onBlur=\"self.close()\">\r\n<img src=\'"+img+"\' align='left'>\r\n<table height='100%'>\r\n<tr>\r\n<td valign='top'><br><br>"+texte+"</td>\r\n</tr>\r\n</table>\r\n</body>\r\n</html>");
	}
}

/* fin affichage photos */

/* popup pour l'affichage des feuilles de match "excel" */

function fdm(fichier) {
  ff=window.open(fichier,"popup",
               "width=740,height=570,left=30,top=20, scrollbars=no,resizable=no,menubar=no,status=no,toobar=no,location=no") }