var myserv = "//proxynews.pixtor.com/" ;

var avecTn ;
var avecListe ;
var timeLeft ;
var payPage = 0 ;
var noMap = 0 ;


function findImage(n)
	{
	for(i = 0 ; i < document.images.length ; i++)
		{
		if(document.images[i].name == "tn" + n)
			{
			return(document.images[i]) ;
			}
		}
	return(null) ;
	}

function mkURLSame()
	{
	document.write("<a class=novisit href=matcher.html?" +  main_forum + "?" + main_dateinv + "?" + main_fichier + "?look?1><img src=img/oeil.gif border=0 align=left hspace=0>Rechercher les images similaires</a>") ;
	}

function mkURLSave()
	{
	document.write("<a class=novisit href=javascript:;  onClick=\"MM_openBrWindow('http://img.pixtor.com/prive/" + main_dateinv + "/" + main_forum + "/" + main_fichier + "','','menubar=yes,scrollbars=yes,resizable=yes,width=500,height=400')\"><img src=img/retablir.gif border=0 align=left style='margin-right:4px;'>Ouvrir l'image dans une nouvelle fen&ecirc;tre pour l'enregistrer</a>") ;
	}

function mkURLNews()
	{
	document.write("<a href=news:" + myserv + main_uniq + ">le serveur cache</a>") ;
	}

function mkURLNewsDirect()
	{
	document.write("<a href=news:" + main_uniq + ">le serveur de news de votre fournisseur d'acc&egrave;s</a>") ;
	}

function mkURLMain(i)
	{
	return("main.html?" + 
		 + tabstr[7][i]
		 + "?"
		 + tabstr[6][i]
		 + "?"
		 + tabstr[5][i]
		 + "?"
		 + tabstr[4][i]
		 + "?"
		 + tabstr[0][i]
		 + "?"
		 + tabstr[2][i]
		 + "?"
		 + tabstr[1][i]
		 + "?"
		 + tabstr[3][i]
		 ) ;
	}

function mkURLpic()
	{
	document.write('<img border=0 src="/public/' + rdate + '/' + rgroupe + '/tn/' + rnom + '">') ;
	}

function mkURLcomptage()
	{
	document.write("<script src=\"/public/js/" + pixtor_param[1] + ".js\"></script>") ;
	}

function mkNavig()
	{
	var i = 1 ;
	var img = 0 ;

	if(pprece > 0)
		{
		document.write('<a href="finder.html?' + kw + '?' + pprece + '">...' + pprece + '</a> ') ;
		}

	document.write("<select name=first onChange=\"MonJumpMenu(this)\">") ;
	while(img < totimg)
		{
		document.write("<option") ;
		if(i == pnum)
			{
			document.write(" selected") ;
			}
		document.write(" value=" + i + ">" + i + "\n") ;
		i++ ;
		img += imglig * imgcol ;
		}
	document.write("</select>") ;
	
	if(pnum < i - 1)
		{
		document.write(' <a href="finder.html?' + kw + '?' + psuiv + '">' + psuiv + '...</a>') ;
		}
	}

function mkNavigScroll()
	{
	var i = 1 ;
	var img = 0 ;

	if(pprece > 0)
		{
		document.write('<a href="matcher.html?' + rgroupe + '?' + rdate + '?' + rnom + '?look?' + pprece + '">...' + pprece + '</a> ') ;
		}

	document.write("<select name=first onChange=\"MonJumpMenu(this)\">") ;

	while(img < totimg)
		{
		document.write("<option") ;
		if(i == pnum)
			{
			document.write(" selected") ;
			}
		document.write(" value=" + i + ">" + i + "\n") ;
		i++ ;
		img += imglig * imgcol ;
		}
	document.write("</select>") ;

	if(pnum < i - 1)
		{
		document.write(' <a href="matcher.html?' + rgroupe + '?' + rdate + '?' + rnom + '?look?' + psuiv + '">' + psuiv + '...</a>') ;
		}
	}
	
function mkNavigTop()
	{
	var i = 1 ;
	var img = 0 ;

	if(pprece > 0)
		{
//		document.write('<a href="bestof.html?' + rgroupe + '?' + rdate + '?' + rnom + '?top?' + pprece + '">...' + pprece + '</a> ') ;
		document.write('<a href="bestof.html?void?void?void?top?' + pprece + '">...' + pprece + '</a> ') ;
		}

	document.write("<select name=first onChange=\"MonJumpMenu(this)\">") ;

	while(img < totimg)
		{
		document.write("<option") ;
		if(i == pnum)
			{
			document.write(" selected") ;
			}
		document.write(" value=" + i + ">" + i + "\n") ;
		i++ ;
		img += imglig * imgcol ;
		}
	document.write("</select>") ;

	if(pnum < i - 1)
		{
		document.write(' <a href="bestof.html?void?void?void?top?' + psuiv + '">' + psuiv + '...</a>') ;
//		document.write(' <a href="bestof.html?' + rgroupe + '?' + rdate + '?' + rnom + '?top?' + psuiv + '">' + psuiv + '...</a>') ;
		}
	}
	
function mkNavigLast()
	{
	var i = 1 ;
	var img = 0 ;

	if(pprece > 0)
		{
		document.write('<a href="lastpix.html?void?void?void?last?' + pprece + '">...' + pprece + '</a> ') ;
		}

	document.write("<select name=first onChange=\"MonJumpMenu(this)\">") ;

	while(img < totimg)
		{
		document.write("<option") ;
		if(i == pnum)
			{
			document.write(" selected") ;
			}
		document.write(" value=" + i + ">" + i + "\n") ;
		i++ ;
		img += imglig * imgcol ;
		}
	document.write("</select>") ;

	if(pnum < i - 1)
		{
		document.write(' <a href="lastpix.html?void?void?void?last?' + psuiv + '">' + psuiv + '...</a>') ;
		}
	}
	
function mkNavigHisto()
	{
	var i = 1 ;
	var img = 0 ;

	if(pprece > 0)
		{
		document.write('<a href="histo.html?' + pixtor_param[1] + '?' + pixtor_param[2] + '?void?histo?' + pprece + '">...' + pprece + '</a> ') ;
		}

	document.write("<select name=first onChange=\"MonJumpMenu(this)\">") ;

	while(img < totimg)
		{
		document.write("<option") ;
		if(i == pnum)
			{
			document.write(" selected") ;
			}
		document.write(" value=" + i + ">" + i + "\n") ;
		i++ ;
		img += imglig * imgcol ;
		}
	document.write("</select>") ;

	if(pnum < i - 1)
		{
		document.write(' <a href="histo.html?' + pixtor_param[1] + '?' + pixtor_param[2] + '?void?histo?' + psuiv + '">' + psuiv + '...</a>') ;
		}
	}
	
function mkNavigIndex()
	{
	var i = 1 ;
	var img = 0 ;

	if(pprece > 0)
		{
		document.write('<a href="groupindex.html?' + ng + '?' + aa + mm + jj + '?' + pprece + '">...' + pprece + '</a> ') ;
		}

	document.write("<select name=first onChange=\"MonJumpMenu(this)\">") ;

	while(img < totimg)
		{
		document.write("<option") ;
		if(i == pnum)
			{
			document.write(" selected") ;
			}
		document.write(" value=" + i + ">" + i + "\n") ;
		i++ ;
		img += imglig * imgcol ;
		}
	document.write("</select>") ;

	if(pnum < i - 1)
		{
		document.write(' <a href="groupindex.html?' + ng + '?' + aa + mm + jj + '?' + psuiv + '">' + psuiv + '...</a>') ;
		}
	}

function clic_replace(s) 
	{
	var pos ;
	var c ;
	var temp = "" ;

	for(pos = 0 ; pos < s.length ; pos++)
		{
		c = s.charAt(pos) ;
		if(((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) || ((c >= '0') && (c <= '9')))
			{
			temp += c ;
			}
		else
			{
			temp += ' ' ;
			}
		}
	return(temp) ;
	}

function clic_titre(titre)
	{
	var mots;
	var i;
	var pos = 0 ;
	var str;

	str = clic_replace(titre) ;
	mots = str.split(' ');
	for(i = 0 ; i < mots.length ; i++)
		{
		if(mots[i].length > 2)
			{
			document.write('<a class="kw" href="finder.html?' + mots[i] + '?1">'+ titre.substring(pos, pos + mots[i].length) + '</a>') ;
			}
		else
			{
			document.write(titre.substring(pos, pos + mots[i].length)) ;
			}
		document.write(titre.substring(pos + mots[i].length, pos + mots[i].length + 1)) ;
		pos += mots[i].length + 1 ;
		}
	}


var pixtor_param ;

function getParam()
	{
        var doc;
        pixtor_param = document.location.href.split("?");
	}

function mkURLfinder()
	{
	document.write("<script src=\"/cgi-bin/common/club/rubriques/newsgroups/finder?kw=" + pixtor_param[1] + "&first=" + pixtor_param[2] + "\"></script>") ;
	}

function mkURLmatcher()
	{
	document.write("<script src=\"/cgi-bin/common/club/rubriques/newsgroups/matcher?ng=" + pixtor_param[1] + "&date=" + pixtor_param[2] + "&fn=" + pixtor_param[3] + "&cmd=" + pixtor_param[4] + "&first=" + pixtor_param[5] + "\"></script>") ;
	}

function mkURLlucky()
	{
	var rnd = Math.round(Math.random () * 1000000000000000) ;

	document.write("<script src=\"/cgi-bin/common/club/rubriques/newsgroups/matcher?cmd=luck&uniq=" + rnd + "\"></script>") ;
	}

function mkURLtop()
	{
	var num = pixtor_param[5] ;

	if(num > 1)
		{
		}
	else
		{
		num = 1 ;
		}
//	document.write("<script src=\"/public/bestof" + num + ".js\"></script>") ;
	document.write("<script src=\"/cgi-bin/common/club/rubriques/newsgroups/matcher?cmd=top&first=" + pixtor_param[5] + "\"></script>") ;
	}

function mkURLlast()
	{
	var num = pixtor_param[5] ;

	if(num > 1)
		{
		}
	else
		{
		num = 1 ;
		}
	document.write("<script src=\"/public/lastpix" + num + ".js\"></script>") ;
	}

function mkURLhisto()
	{
	var num = pixtor_param[5] ;
	var when = pixtor_param[2] ;

	if(num > 1)
		{
		}
	else
		{
		num = 1 ;
		}
	document.write("<script src=\"/public/" + when + "/histo" + num + ".js\"></script>") ;
	}

function mkURLindex()
	{
	diese = pixtor_param[3].split("#");
	pixtor_param[3] = diese[0];
	document.write("<script src=\"/public/" 
		+ pixtor_param[2] 
		+ "/" 
		+ pixtor_param[1] 
		+ "/groupe"
		+ pixtor_param[3] 
		+ ".js"
		+ "\"></script>") ;
	}

function mkURLserie()
	{
	diese = pixtor_param[3].split("#");
	pixtor_param[3] = diese[0];
	document.write("<script src=\"/public/" 
		+ pixtor_param[3] 
		+ "/series/" 
		+ pixtor_param[1]
		+ "-"
		+ pixtor_param[2]
		+ ".js"
		+ "\"></script>") ;
	}

function printKw()
	{
	document.write(kwlib) ;
	}

function mkGalerie(tn)
	{
	var i, j ;

	if(tn == 0)
		{
		return ;
		}

	for(i = 0 ; i < imglig ; i++)
		{
		document.write('<tr>') ;
		for(j = 0 ; j < imgcol ; j++)
			{
			var p = i * imgcol + j ;

			if(p >= ctrimg)
				{
				break ;
				}
			document.write('<td>') ;
			mkTn(p) ;
			document.write('</td>') ;
			}
		document.write('</tr>') ;
		}
	}

function mkListe(lst)
	{
	var i ;

	if(lst == 0)
		{
		return ;
		}

	for(i = 0 ; i < ctrimg ; i++)
		{
		mkDetail(i, (i % 2)) ;
		}
	}

function compare_new(t1, t2)
{
	return t2[1] - t1[1];
}

function compare_total(t1, t2)
{
	return t2[0] - t1[0];
}

function compare_forum(t1, t2)
{
	if (t1[2] < t2[2])
	{
		return - 1;
	}
	else
	{
		return 1;
	}
}

function compare_touch(t1, t2)
{
	return (t1[4] < t2[4] ? 1 : -1)
}

function printListe(tri)
	{
	var i ;

	var tab2 = new Array();
	for(i = 0 ; i < nbforum ; i++)
		{
		tab2[i] = new Array(tabstr[0][i],tabstr[1][i],tabstr[2][i],tabstr[3][i], tabstr[4][i], tabstr[5][i], tabstr[6][i], tabstr[7][i]);
		}

	if ( tri == "new" )
	{
		tab2.sort(compare_new);
	}
	else if ( tri == "total" )
	{
		tab2.sort(compare_total);
	}
	else if ( tri == "forum" )
	{
		tab2.sort(compare_forum);
	}
	else if ( tri == "touch" )
	{
		tab2.sort(compare_touch);
	}

	backtotop = "<a href=#>"
		 + "<img src=img/remonter.gif width=18 height=18 alt=\"Retour en haut de la page\" border=0>"
		 + "</a>"

	for(i = 0 ; i < nbforum ; i++)
		{
		p = i % 2 ;
		monStyle = ((p == 0) ? "lignepaire" : "ligne") ;
		back = i % 12 ;
		if(avecVignettes == 1)
			{
			strPix =  "<img border=0 width=40 heigth=40 src=http://img.pixtor.com/prive/public/"
				 + tab2[i][4].substring(0, 4)
				 + tab2[i][4].substring(5, 7)
				 + tab2[i][4].substring(8, 10)
				 + "/"
				 + tab2[i][2]
				 + "/tn/"
				 + tab2[i][6]
				 + ">"
			}
		else
			{
			strPix = "Voir..." ; 
			}

		document.write(
		 "<tr>"
		 + "<td align=center class=" + monStyle + " style='border-right: solid #cc0088 1px; border-left: solid #cc0088 1px;'>"
		 + "<a href=groupindex.html?"
		 + tab2[i][2] 
		 + "?"
		 + tab2[i][4].substring(0, 4)
		 + tab2[i][4].substring(5, 7)
		 + tab2[i][4].substring(8, 10)
		 + "?1"
		 + ">"
		 + strPix
		 + "</a>"
		 + "</td>"
		 + "<td class=" + monStyle + ">"
		 + "<a href=groupindex.html?"
		 + tab2[i][2] 
		 + "?"
		 + tab2[i][4].substring(0, 4)
		 + tab2[i][4].substring(5, 7)
		 + tab2[i][4].substring(8, 10)
		 + "?1"
		 + "?" + tab2[i][6]
		 + ">"
		 + tab2[i][2] 
		 + "</a><br>"
		 + unescape(tab2[i][7])
		 + "</td><td class=" + monStyle
		 + " style='font-size:10px;'>" 
		 + tab2[i][4].substring(8, 10) + "/"
		 + tab2[i][4].substring(5, 7) + " "
		 + tab2[i][4].substring(11, 13) + "h"
		 + tab2[i][4].substring(14, 16) + " : +"
		 + tab2[i][5] 
		 + " images"
		 + "</a></td><td class=" + monStyle
		 + " align=right>"
		 + tab2[i][0]
		 + "</td><td align=right class=" + monStyle + ">"
		 + tab2[i][1]
		 + "</td></tr>") ;
		}
	}

function serie_compare_forum(t1, t2)
{
	return (t2[2] < t1[2] ? 1 : -1) ;
}

function serie_compare_titre(t1, t2)
{
	return (t2[7] < t1[7] ? 1 : -1) ;
}

function serie_compare_nombre(t1, t2)
{
	return t2[0] - t1[0];
}

function printSeries(tri)
	{
	var i ;

	var tab2 = new Array();
	for(i = 0 ; i < nbseries ; i++)
		{
		tab2[i] = new Array(serie[0][i],serie[1][i],serie[2][i],serie[3][i], serie[4][i], serie[5][i], serie[6][i], serie[7][i]);
		}

	if ( tri == "forum" )
	{
		tab2.sort(serie_compare_forum);
	}
	else if ( tri == "titre" )
	{
		tab2.sort(serie_compare_titre);
	}
	else if ( tri == "nombre" )
	{
		tab2.sort(serie_compare_nombre);
	}

	backtotop = "<a href=#>"
		 + "<img src=img/remonter.gif width=18 height=18 alt=\"Retour en haut de la page\" border=0>"
		 + "</a>"

	for(i = 0 ; i < nbseries ; i++)
		{
		p = i % 2 ;
		monStyle = ((p == 0) ? "lignepaire" : "ligne") ;
		back = i % 12 ;
		if(avecVignettes == 1)
			{
			strPix =  "<img border=0 width=50 heigth=50 src=http://img.pixtor.com/prive/public/"
				 + tab2[i][4]
				 + "/"
				 + tab2[i][2]
				 + "/tn/"
				 + tab2[i][6]
				 + ">"
			}
		else
			{
			strPix = "Voir..." ; 
			}

		document.write(
		 "<tr>"
		 + "<td align=center class=" + monStyle + " style='border-right: solid #3377ff 1px; border-left: solid #3377ff 1px;'>"
		 + "<a href=serieindex.html?"
		 + tab2[i][2] 
		 + "?"
		 + tab2[i][5]
		 + "?"
		 + tab2[i][4]
		 + "?1"
		 + ">"
		 + strPix
		 + "</a>"
		 + "</td>"
		 + "<td class=" + monStyle + ">"
		 + tab2[i][2] 
		 + "<br>"
		 + "<a href=serieindex.html?"
		 + tab2[i][2] 
		 + "?"
		 + tab2[i][5]
		 + "?"
		 + tab2[i][4]
		 + "?1"
		 + ">"
		 + unescape(tab2[i][7])
		 + "</a>"
		 + "<br>"
		 + tab2[i][0]
		 + " images</td>"
		 + "</tr>") ;
		}
	}
	
function mkTn(n)
	{
	var iclass = "vign" ;
	var yenc = tabstr[1][n].toLowerCase().indexOf("yenc") ;
	if(yenc >= 0)
		{
		iclass = "yenc" ;
		}

	document.write('<td align="center" valign="bottom" width="130" height="130"><a href="'
		+ mkURLMain(n)
		+ '" class="' + iclass + '"><img name=tn' + n + ' src=http://img.pixtor.com/prive/public/'
		+ tabstr[7][n]
		+ tabstr[6][n]
		+ tabstr[5][n]
		+ '/'
		+ tabstr[4][n]
		+ '/tn/'
		+ tabstr[0][n]
		+ ' border=0 '
//		+ 'onMouseOver="showmenu(event, ' + n + ')" onMouseOut="delayhidemenu()"'
		+'></a>'
		) ;

	if(noMap == 0)
		{

		document.write('<br><img src="img/chercher.gif" width="35" height="18" usemap="#Map'
		+ tabstr[0][n]
		+ '" border="0" vspace="3"><map name="Map'
		+ tabstr[0][n]
		+ '"><area shape="rect" coords="1,1,17,17" href="#ancre'
		+ n
		+ '" alt="Informations"><area shape="rect" coords="17,1,34,17" href="matcher.html?'
		+ tabstr[4][n]
		+ '?'
		+ tabstr[7][n]
		+ tabstr[6][n]
		+ tabstr[5][n]
		+ '?'
		+ tabstr[0][n]
		+ '?look?1'
		+ '" alt="Voir photos similaires"></map>'
		) ;
		}

	document.write('</td>') ;
	}

function mkDetail(n, p)
	{
	var iclass = "vign" ;
	var yenc = tabstr[1][n].toLowerCase().indexOf("yenc") ;
	if(yenc >= 0)
		{
		iclass = "yenc" ;
		}

	document.write('<tr valign="top"><td align="right" valign="top" class="'
		+ ((p == 0) ? "lignepaire" : "ligne")
		+ '"><a name="ancre'
		+ n
		+ '"></a>' 

		+ '<a href="' 
		+ mkURLMain(n)

		+ '" class="' + iclass + '"><img src="http://img.pixtor.com/prive/public/'
		+ tabstr[7][n]
		+ tabstr[6][n]
		+ tabstr[5][n]
		+ '/'
		+ tabstr[4][n]
		+ '/tn/'
		+ tabstr[0][n]
		+ '" border=0></a><br></td><td valign="top" class="'
		+ ((p == 0) ? "lignepaire" : "ligne")
		+ '"><a class="titre" href="groupindex.html?'
		+ tabstr[4][n]
		+ '?'
		+ tabstr[7][n]
		+ tabstr[6][n]
		+ tabstr[5][n]
		+ '?1">'
		+ tabstr[4][n]
		+ ' : '
		+ tabstr[5][n]
		+ '/'
		+ tabstr[6][n]
		+ '/'
		+ tabstr[7][n]
		+ '</a><br>'
		+ '<a href="' 
		+ mkURLMain(n)
		+ '">'
		+ unescape(tabstr[2][n])
		+ '</a>'
//		+ ' ' + tabstr[3][n]
		+ '<br><i><script language="javascript">clic_titre(\''
		+ unescape(tabstr[1][n]).replace(/\\/g, '\\\\').replace(/\'/g, '\\\'')
		+ '\');</script></i><br><a class=petit href="matcher.html?'
		+ tabstr[4][n]
		+ '?'
		+ tabstr[7][n]
		+ tabstr[6][n]
		+ tabstr[5][n]
		+ '?'
		+ tabstr[0][n]
		+ '?look?1'
		+ '"><IMG src=img/oeil-bouton.gif width=19 height=18 border=0 align=left style=margin-right:4px;margin-top:2px;>Rechercher les images similaires</a><br></td></tr>') ;
	}

var main_date, main_dateinv, main_forum, main_fichier, main_nom, main_titre, main_aa, main_mm, main_jj, main_uniq;
function main_param()
{
	var doc;
	doc = document.location.href.split("?");
	main_date =  doc[3]+'/'+doc[2]+'/'+doc[1];
	main_dateinv = doc[1]+doc[2]+doc[3];
	main_forum = doc[4];
	main_fichier = doc[5];
	main_nom = unescape(doc[6]);
	main_titre = unescape(doc[7]);
	main_uniq = unescape(doc[8]);
	main_aa = doc[1];
	main_mm = doc[2];
	main_jj = doc[3];
}

function startFinder(cell)
{
	if(cell.value.length == 0)
		{
		alert("Veuillez taper le mot que vous recherchez svp !") ;
		}
	else
		{
		window.location.href="finder.html?" + cell.value + "?1";
		}
}

function submitAddr(addr)
{
	if(addr.value.length == 0)
		{
		alert("Veuillez taper votre email svp") ;
		}
	else
		{
		window.location.href="inscrip2.html?" + addr.value ;
		}
}

function printDate(groupname, quand)
	{
	str = "<table border=0>" ;

	for(i = 0 ; i < 7 ; i++)
		{
		str += "<tr><td align=right width=50%>" ;

		for(idx = 0 ; idx < 7 ; idx++)
			{
			if(libdate[0][i] == tabng[0][idx])
				{
				if(quand == tabng[0][idx])
					{
					str += "<img src=img/pointage.gif border=0 width=12 height=12 align=left><span class=titre>" + insecable(libdate[1][i]) + "</span>" ;
					}
				else if(tabng[1][idx] == 0)
					{
					str += insecable(libdate[1][i]) ;
					}
				else
					{
					str += "<a href=groupindex.html?" + groupname + "?" + tabng[0][idx] + "?1>"  + insecable(libdate[1][i]) + "</a>"
					}
				break ;
				}
			}
		if(idx == 7)
			{
			str += libdate[1][i] ;
			}
		str += "</td>" ;
		str += "<td align=right width=50%>" ;
		if(tabng[1][idx] > 0)
			{
			}
		else
			{
			tabng[1][idx] = 0 ;
			}
		str += tabng[1][idx] ;
		str += "&nbsp;images" ;
		str += "</td></tr>" ;
		}

	str += "</table>" ;
	document.write(str) ;
	}

function mkApplet()
	{
	str = "<applet codebase=\"/mess\" code=\"Mess.java\" from=\"" + document.location.href + "\"width=200 height=40>Activez Java !</applet>" ;
	document.write(str) ;
	}

function Pixgetcookie(mycookie)
{
	ccontent = ""
	if(document.cookie.length> 0)
	{
		offset = document.cookie.indexOf(mycookie + "=")
		if(offset == -1) return ccontent;
		offset += mycookie.length + 1 ;
		end = document.cookie.indexOf(";", offset);
		if(end == -1) end = document.cookie.length;
		ccontent = unescape(document.cookie.substring(offset, end))
	}

	return ccontent;
}

function Pixsetcookie(cook, value)
{
	document.cookie = cook + "=" + escape(value) + "; path=/" ;
}

function mkBoutonTn()
{
	if ( avecTn == 1 )
	{
		document.write ( '<A href=' + document.location + ' onClick=SauveTn(\"'
	+ 0 + 
	'\")><img src="img/fermer.gif" width=16 height=14 alt="Enlever la planche contact" border=0></A>' );
	}
	else
	{
		document.write ( '<A href=' + document.location + ' onClick=SauveTn(\"'
	+ 1 + 
	'\")><img src="img/agrandir.gif" width=16 height=14 alt="Afficher la planche contact" border=0></A>' );
	}
}

function SauveTn(critere)
{
        Pixsetcookie("avecTn", critere);
	if((critere == 0) && (avecListe == 0))
		{
		SauveListe(1) ;
		}
}

function ChargeTn()
{
        avecTn = Pixgetcookie("avecTn");
        if ( avecTn == "" )
        {
                avecTn = 1 ;
        }
}

function mkBoutonListe()
{
	if ( avecListe == 1 )
	{
		document.write ( '<A href=' + document.location + ' onClick=SauveListe(\"'
	+ 0 + 
	'\")><img src="img/fermer.gif" width=16 height=14 alt="Enlever la liste" border=0></A>' );
	}
	else
	{
		document.write ( '<A href=' + document.location + ' onClick=SauveListe(\"'
	+ 1 + 
	'\")><img src="img/agrandir.gif" width=16 height=14 alt="Afficher la liste" border=0></A>' );
	}
}

function SauveListe(critere)
{
        Pixsetcookie("avecListe", critere);
	if((critere == 0) && (avecTn == 0))
		{
		SauveTn(1) ;
		}
}

function ChargeListe()
{
        avecListe = Pixgetcookie("avecListe");
        if ( avecListe == "" )
        {
                avecListe = 1 ;
        }
}


try
	{
	if(sansMap == 1)
		{
		noMap = 1 ;
		}
	}
catch(e)
	{
	noMap = 0 ;
	}

function cesure(nom)
{
	if ( nom.length > 30 )
	{
		var reg_exp = new RegExp("\\.","gi");
		nom = nom.replace(reg_exp, ". ") ;
		var reg_exp = new RegExp("_","gi");
		nom = nom.replace(reg_exp, " ") ;
		return nom.replace(reg_exp, ". ") ;
	}
	else
	{
		return nom ;
	}
}

function insecable(nom)
{
	var reg_exp = new RegExp("\\ ","gi");
	nom = nom.replace(reg_exp, "&nbsp;") ;
	return nom.replace(reg_exp, ". ") ;
}

function mkPotd()
	{
	str = "<table cellspacing=0 cellpadding=0><tr><td><a href=potd.html?"
			+ potd_creation.substring(0, 4)
			+ "?"
			+ potd_creation.substring(4, 6)
			+ "?"
			+ potd_creation.substring(6, 8)
			+ "?"
			+ potd_group
			+ "?"
			+ potd_num
			+ "?"
			+ potd_fn
			+ "?"
			+ potd_titre
			+ "?"
			+ potd_msgid
			+ ">"
		+ "<img src=http://img.pixtor.com/prive/public/"
			+ potd_creation
			+ "/"
			+ potd_group
			+ "/tn/"
			+ potd_num
			+ " border=0 hspace=0>"
		+ "</a>"

		+ "</td><td width=100 valign=top class=petit style='padding-left:6px;'>"
		+ unescape(potd_comment)
		+ "</td></tr></table>" 

		;

	document.write(str) ;
	}

function mkGraph()
	{
	strt = '<TABLE border=0 cellspacing=4 cellpadding=0><TR valign="bottom" align="center"><TD>' ;

	max = 0 ;
	for(i = 0 ; i < 7 ; i++)
		{
		if(libdate[2][i] > max)
			{
			max = libdate[2][i] ;
			}
		}

	for(i = 6 ; i >= 1 ; i--)
		{
		val = 80 * libdate[2][i] / max ;
		strt += '<TABLE cellspacing=0 cellpadding=0><TR><TD height="' + val + '" bgcolor="#cc0088"><a href=histo.html?' + i + '?' + libdate[0][i] + '?void?histo?1><IMG src="img/col.gif" height="' + val + '" width="12" border=0></a></TD></TR></TABLE></TD><TD>' ;
		}

	// dernière colonne avec effet

	val = Math.round(80 * libdate[2][i] / max) ;
	comp = 80 - val ;
	strt += '<TABLE cellspacing=0 cellpadding=0 height=80>'
		+ '<tr><td valign=bottom height=' + comp + '>'
		+ '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width=12 height=' + comp + '>'
		+ '<PARAM name=movie value="flocons.swf?h=' + comp + '">'
		+ '<PARAM name=quality value=high><PARAM name="SCALE" value="noborder"><PARAM name="wmode" value="transparent">'
		+ '<EMBED src="flocons.swf?h=' + comp +'" quality=high wmode=transparent pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="12" height="' + comp + '" scale="noborder">'
		+ '</EMBED></OBJECT>'
		+ '</td></tr>'
		+ '<tr><td height=' + val + ' bgcolor="#cc0088">'
		+ '<TABLE cellspacing=0 cellpadding=0 height=' + val + '><TR><TD><a href=lastpix.html><IMG src="img/col.gif" height=' + val + ' width=12 border=0></a></TD></TR></TABLE>'
		+ '</td></tr></table>'
		+ '</TD></TR><TR>' ;

	// noms de colonnes
	
	for(i = 6 ; i >= 1 ; i--)
		{
		strt += '<TD class=petit><a href=histo.html?' + i + '?' + libdate[0][i] + '?void?histo?1>' + libdate[1][i].substring(0, 3) + '.</a></TD>' ;
		}

	strt += '<TD class=petit><a href=lastpix.html>' + libdate[1][0].substring(0, 3) + '.</a></TD>' ;

	strt += '</TR></TABLE>' ;

	document.write(strt) ;
	}

