
function FillThumbs(picidx) {

	//alert(maxidx);
	if (maxidx > 5)
	{
		var z=document.getElementById('CntSeries').rows;
		var w=z[0].cells;
		var cntidx = picidx / 5 + 1;
		var pagemax = Math.ceil(maxidx / 5);
		w[0].innerHTML = "<font size=5>page " + cntidx + "/" + pagemax + "</font>";
	}
	else
	{
		var z=document.getElementById('CntSeries').rows;
		var w=z[0].cells;
		w[0].innerHTML = "<font size=5>page 1/1</font>";
	}

	var cntstart = picidx;
	i = 0;
	while (i < 5)
	{
		if (picidx >= maxidx)
		{
			var putthispic = "no_entry.png";
			var putthisx = 98;
			var putthisy = 100;
			var putthistext = "&nbsp;";
			var putthisthumb = "point.gif";
			var putthispoeme = "";
		}
		else
		{
			var putthispic = dirpic + tablepics[picidx];
			var putthisx = tableresolx[picidx];
			var putthisy = tableresoly[picidx];
			var putthistext = tabletexts[picidx];
			var putthisthumb = dirthumb + tablethumbs[picidx];
			if (typeof(tablepoemes) != "undefined") {
				var putthispoeme = tablepoemes[picidx];
			}
			else
			{
				var putthispoeme = "";
			}
		}

		var piclink = link1 + '"'+ putthispic +'"';
		//piclink = piclink + link2;
		piclink = piclink + ','+ putthisx +',' + putthisy +',';
		piclink = piclink + '"'+ putthispoeme +'"';
		piclink = piclink + link22;
		piclink = piclink + '"'+ putthistext +'"';
		piclink = piclink + link3;
		piclink = piclink + '"' + putthisthumb +'"';
		if (picidx >= maxidx)
		{
			piclink = piclink + link42;
		}
		else
		{
			piclink = piclink + link4;
		}

		var x=document.getElementById('Thumbnails').rows;
		var y=x[0].cells;
		y[i].innerHTML = piclink;

		picidx = picidx + 1;
		i++;
	}
}

function MettreTexte(textchange) {
	var x=document.getElementById('ZoneText').rows;
	var y=x[0].cells;
	y[0].innerHTML= textchange;
}

function OterTexte() {
	var x=document.getElementById('ZoneText').rows;
	var y=x[0].cells;
	y[0].innerHTML= "";
}

