function showGallery(category, name, format) { // For example, category = "c_function".
  var n = name.length, length = category.length, counter = 1, number;
  if (format == null) format = "gif";
  
  document.write('<table width="100%" border="0" cellspacing="10">');
  
  // Show the figures on the screen.
  while (counter <= n) {
    document.write('<tr align="center" valign="bottom">');
    for (i=0; i<4; i++) {
	    document.write('<td width="25%">');
	    if (counter+i <= n) {
	      if (counter+i < 10)
		    number = "0" + String(counter+i);
		  else
	  	  number = String(counter+i);  
		  document.write('<a href="' + category.substring(2, length) + '/description/' + category + '_' + number + '.htm" target="_blank"><img src="' + category.substring(2, length) + '/r_' + category.substring(2, length) + '_' + number + '.' + format + '"></a>');
	    }
	    document.write('</td>');
	  }
	  document.write('</tr>');

    // Show the name of the figures.
    document.write('<tr align="center" class="name">');
    for (i=0; i<4; i++) {
	    document.write('<td width="25%">');
	    if (counter+i <= n) {
        if (counter+i < 10)
	  	  number = "0" + String(counter+i);
		  else
		    number = String(counter+i);
	      document.write('<a href="' + category.substring(2, length) + '/description/' + category + '_' + number + '.htm" target="_blank">' + name[counter+i-1] + '</a>');
	    }
	    document.write('</td>');
	  }
	  document.write('</tr>');
	  counter = counter + 4;
  }
  document.write('</table>');
}
