var imgarr = new Array();
var title = new Array();
var aidx = new Array();

imgarr[1] = new Image();
imgarr[1].src = "http://www.intel.com/pressroom/kits/photonics2008/images/sm01.jpg";
title[1] = "Close-up of a silicon wafer containing experimental Avalanche Photodetector chips.";
aidx[1] = "1";

imgarr[2] = new Image();
imgarr[2].src = "/pressroom/kits/photonics2008/images/sm02.jpg";
title[2] = "Close-up of a silicon Avalanche Photodetector chip. In the center is a grid of many individual photodectors with different designs, allowing researchers to test various properties of the devices.";
aidx[2] = "2";

imgarr[3] = new Image();
imgarr[3].src = "/pressroom/kits/photonics2008/images/sm03.jpg";
title[3] = "A spot of light shines on a silicon Avalanche Photodetector chip. Each yellow circle here is a different photodetector experiment.";
aidx[3] = "3";

imgarr[4] = new Image();
imgarr[4].src = "/pressroom/kits/photonics2008/images/sm04.jpg";
title[4] = "A ladybug crawls across an experimental Avalanche Photodetector chip containing silicon optical devices that are only a fraction of a millimeter.";
aidx[4] = "4";

imgarr[5] = new Image();
imgarr[5].src = "/pressroom/kits/photonics2008/images/sm05.jpg";
title[5] = "A packaged silicon Avalanche Photodetector held in a pair of tweezers. A silicon chip is mounted in the circle on the upper right, while electrical pins on the lower left allow researchers to interface the device with test equipment.";
aidx[5] = "5";

imgarr[6] = new Image();
imgarr[6].src = "/pressroom/kits/photonics2008/images/sm06.jpg";
title[6] = "A packaged silicon Avalanche Photodetector. The silicon chip is the grey square in the center of the image. Wire-bonds connect the device to the package pins, which in turn allow researchers to interface the device with test equipment.";
aidx[6] = "6";


function roll(n) {
  if (imgarr[n] == null) return;
  document.img.src = imgarr[n].src;
  document.art.titl.value = title[n];
}

function setup() {
  roll('1');
  for (i=1;i<7;i++) {
    im = "im"+i;
    document[im].src=imgarr[i].src;
  }
}