function afficheMaxi(chemin)
{
i1 = new Image;
i1.src = chemin;

html1 = '<HTML><HEAD><TITLE>exhibes amateur</TITLE><link rel="stylesheet" href="../exhibes.css" type="text/css">';
html2 = '</HEAD><BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=10 MARGINHEIGHT=0 bgcolor=#000000 link=#ffffff>';
html3 = '<CENTER><IMG SRC="'+chemin+'" BORDER=3 NAME=imageTest onLoad="window.resizeTo(document.imageTest.width+50,document.imageTest.height+150)">';
html4 = '</CENTER></BODY></HTML>';


popupImage = window.open('','_blank','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=1,resizable=1,width=300,height=400');
popupImage.document.open();
popupImage.document.writeln(html1);
popupImage.document.writeln(html2);
popupImage.document.writeln(html3);
popupImage.document.writeln('<br><a href=# onClick=window.close()><b>Fermer la Fenêtre</b></A>');
//popupImage.document.writeln('<P><a href=http://kit.carpediem.fr/10846/CD/BlondeSalope.exe><b>Accès direct à ma partie privée</b></A></P>');
popupImage.document.writeln(html4);
popupImage.document.close()
}


function galerie(site,nb,col) {

	p = 1;
	row = 0 ;
	theSite = (site);
	pict = new Array(nb);
	for (n=0; n<pict.length; n++){
	pict[n]= "TN_"+(n+1)+".jpg";
	}

	nbCol = (col);
	nbRow =(nb/col);
	row = Math.ceil(nbRow);
	nbPict = (nb)
//	document.write(nb+' '+p+' '+(nb+1)+' '+nbPict);
	

	document.write('<TABLE WIDTH=100% CELLPADING=5 CELLSPACING=5>');
		while (p<=nbPict){
			document.write('<TR>');
				for (j=1; j<=col; j++) {
				document.write('<TD align=center>');
					if (p <= nbPict) {
					document.write('<A HREF="javascript:afficheMaxi(\''+theSite+'/'+p+'.jpg\')"><IMG SRC="'+theSite+'/TN_'+p+'.jpg" border=3 VSPACE=5></TD></a>');
			p++;
					}
					else {
					document.write(' </TD>');
					}
				}
		document.write('</TR>');
		}
	document.write('</TABLE>');
}


