function RandomNumber(maxNum)
{
  if (Math.random && Math.round)
  {
    var ranNum= Math.round(Math.random()*(maxNum-1));
    ranNum+=1;
    return ranNum;
  }
  else
  {
  today= new Date();
  hours= today.getHours();
  mins=   today.getMinutes();
  secn=  today.getSeconds();
  if (hours==19)
   hours=18;
  var ranNum= (((hours+1)*(mins+1)*secn)%maxNum)+1;
  return ranNum;
  }
}

function GetPic()
{
 var maxPics=14;
 var ChosenOne=RandomNumber(maxPics);

 ChosenOne+= '';
 document.write('<img src="'+ChosenOne+'.jpg" width="201" height="145">'); 
}

GetPic();