numphotos = 15;

function random_img()
{
    var num = (numphotos-1)*Math.random();
    num = Math.round(num) + 1;
    document.write("<img src=\"images/pic", num, ".gif\"  width=\"252\" height=\"234\" alt=\"Andrew\">");
}