

var usedyet = new Array( thumbs.length );

for ( var counter = 0; counter < usedyet.length; counter++ ) usedyet[ counter ] = 0;

function dowall( rows, cols, height )
{				
	for ( counter = 1; counter <= rows * cols; counter++ )
	{
		var index = Math.floor( Math.random() * thumbs.length );

		// Cycle round until get an unused one.
		while ( usedyet[ index ] == 1 )
		{
			index++;
			index = index % thumbs.length;
		}

		// Flag this one as used.
		usedyet[ index ] = 1;

		if ( height == 60 )
		{
			 document.write( '<img src="'+thumbs[index]+'" width="80" height="60">' );
		}
		else
		{
			document.write( '<img src="'+thumbs[index]+'" width="120" height="90">' );
		}
		
		if ( (counter % cols) == 0 ) document.write( '<br>\n' );
	}
}
