document.writeln();
for (j = 0; j < i; j = j + 1) {
 if (pictures[j][3]) document.writeln('<a href="' + pictures[j][2] + '" title="' + pictures[j][3] +'" onclick="return showPic(' + j + ')"><img src="' + pictures[j][1] + '"></a>');
 else document.writeln('<a href="' + pictures[j][2] + '" onclick="return showPic(' + j + ')"><img src="' + pictures[j][1] + '"></a>');
}