
// JavaScript Document
function random_images(imgnum, alignpic, folder, alt, width, height, border, pictype)
{
  if (!imgnum)
  {
    imgnum=2;
  }
  if (!folder)
  {
    folder='images';
  }
  var useRand = 0;
  var rand1 = 0;
  do {
    var randnum = Math.random();
    rand1 = Math.round((imgnum - 1) * randnum) + 1;
  } while (rand1 == useRand);
  useRand = rand1;
  document.write('<img src="');
  if (!pictype){pictype='jpg';}
  if (useRand<10){
    document.write('../'+folder+'/'+useRand+'.'+pictype);
  }
  else if (useRand<100)
  {
    document.write('../'+folder+'/0'+useRand+'.'+pictype);
  }
  else
  {
    document.write('../'+folder+'/'+ useRand+'.'+pictype);
  }
  document.write('" alt="'+alt+'"');
  if (width)
  {
    document.write(' width="'+width+'"');
  }
  if (height)
  {
    document.write(' height="'+height+'"');
  }
  if (border)
  {
    document.write(' border="'+border+'"');
  } 
  else 
  {
    document.write(' border="0"');
  }
  if (alignpic)
  {
    document.write(' align="'+alignpic+'"');
  }
  else
  {
     document.write(' align="left"');
  } 
  document.write('>');
}