
function showGrid(rowNum, colNum, path)
{
	var colIdx = 0;
	var rowIdx = 0;

	document.write('<CENTER><TABLE cellspacing=10 cellpadding=0 border=0>');

	for(listIdx = fotoList.length - 1; listIdx >= 0; listIdx--)
	{
		if(colIdx == colNum)
		{
			document.write('</TR>');
			colIdx = 0;
			rowIdx++;
			if(rowIdx >= rowNum) break;
		}
		if(colIdx == 0)
		{
			document.write('<TR>');
		}		
		
		fotoItm = fotoList[listIdx].split("	");		
		document.write('<TD align="center">	<A href="' + path + 'page.html?' + (listIdx+1) + '"><IMG src="' + path + 'thumbnails/' + fotoItm[1] + '.jpg"  width=' + fotoItm[0] + ' border="1" alt="' + fotoItm[2] + '" title="' + fotoItm[2] + '"></A>	</TD>');
		colIdx++;
	}
	
	if(colIdx != 0)
	{
		document.write('</TR>');
	}
	document.write('</TABLE></CENTER>');
}

function showFoto()
{
	var searchStr = this.window.location.search;
	var temp = searchStr.split('?');
	var num = temp[1]++;
	var fotoItm = fotoList[num-1].split('	');
	var numStr = fotoItm[1];
	var comment1 = fotoItm[2];
	var comment2 = fotoItm[3];

	document.write('<P><CENTER>');
	document.write('<TABLE border="0" cellpadding="0" cellspacing="2" width="200">');
	document.write('<TR>');
	if(num < fotoList.length)
	{
		document.write('	<TD width="80" align="center"><A href="page.html?'+ (num+1) + '" ><IMG src="http://www.ljplus.ru/img/o_moskve/previous.gif" border="0" alt="Previous"></A></TD>');
	}
	document.write('	<TD width="80" align="center"><A href="index.htm" ><IMG src="http://www.ljplus.ru/img/o_moskve/home.gif" border="0" alt="Home"></A></TD>');
	if(num != 1)
	{
		document.write('	<TD width="80" align="center"><A href="page.html?'+ (num-1) + '" ><IMG src="http://www.ljplus.ru/img/o_moskve/next.gif" border="0" alt="Next"></A></TD>');
	}
	document.write('</TR>');
	document.write('</TABLE>');
	document.write('</CENTER></P>');

	if(num < 45)
	{
		document.write('<P><CENTER><IMG src="http://www.ljplus.ru/img/o_moskve/' + numStr + '.jpg"  border="1" alt="' + comment1 + '" title="' + comment1 + '"></CENTER></P>');
	}
	else if(num < 51)
	{
		document.write('<P><CENTER><IMG src="http://www.ljplus.ru/img2/o/_/o_moskve/' + numStr + '.jpg"  border="1" alt="' + comment1 + '" title="' + comment1 + '"></CENTER></P>');
	}
	else
	{
		document.write('<P><CENTER><IMG src="http://www.ljplus.ru/img/o/_/o_moskve/' + numStr + '.jpg"  border="1" alt="' + comment1 + '" title="' + comment1 + '"></CENTER></P>');
	}
	document.write('<P><CENTER><FONT size="3"  face="Arial" >' + comment1 + '</FONT></CENTER></P>');
	document.write('<P><CENTER><FONT size="3"  face="Arial" >' + comment2 + '</FONT></CENTER></P>');
}
