var alttext='';

function showthumbnail (whichdir, whichpic, thetext, thespecies)
{
    if (whichpic != '9999') {
        document.write("<div class='float'>");
        document.write("<table border=0 cellspacing=4 cellpadding=0><tr border=0><td class='thumbnails' valign=top>");
        if (whichdir == '.') {
            alttext = '(c) Martin Purvis.&nbsp;&nbsp;&nbsp;Click to see larger picture';
            document.write("<A HREF=\"javascript:showpic('" +whichdir+ "', '" +whichpic+ "', '" +thespecies+ "', '" +thetext+ "');\">");
        } else {
            document.write("<A HREF=\"" +whichdir+ "/index.html\">");
            alttext = '(c) Martin Purvis.&nbsp;&nbsp;&nbsp;Click to go to this species page';
        }
        document.write("<img border=0 width=240 height=180 src='" +whichdir+ "/" +whichpic+ "_t.jpg' style='border-bottom: 1px solid black;' ALT='" +alttext+ "'>");
        document.write("</A>");
        document.write("<br>" +thetext+ "</br>");
        document.write("</td></tr></table>");
        document.write("</div class='float'>");
    } else {
        document.write("<div class='spacer'>&nbsp;</div>");
    }
}