// JavaScript to interpolate random images into a page. var ic = 3; // Number of alternative images var pic1 = new Array(ic); // Array to hold filenames var pic1link = new Array (ic); //Array to hold photo related URL var pic1cap = new Array (ic); // Array to hold caption var pic2 = new Array(ic); // Array to hold filenames var pic2link = new Array (ic); //Array to hold photo related URL var pic2cap = new Array (ic); // Array to hold caption var pic3 = new Array(ic); // Array to hold filenames var pic3link = new Array (ic); //Array to hold photo related URL var pic3cap = new Array (ic); // Array to hold caption var pic4 = new Array(ic); // Array to hold filenames var pic4link = new Array (ic); //Array to hold photo related URL var pic4cap = new Array (ic); // Array to hold caption var pic5 = new Array(ic); // Array to hold filenames var pic5link = new Array (ic); //Array to hold photo related URL var pic5cap = new Array (ic); // Array to hold caption var adminpath = "/docs/IO/3902/"; // photo 1 pic1[0] = "01.jpg"; // image URL pic1link[0] = "http://cosmo.nyu.edu/"; // related URL, if none, type in # pic1cap[0] = ""; // related Caption, if none, leave it blank pic1[1] = "02.jpg"; pic1link[1] = "http://cosmo.nyu.edu/"; pic1cap[1] = ""; // related Caption, if none, leave it blank pic1[2] = "HallBar.jpg"; pic1link[2] = "http://www.physics.nyu.edu/kentlab/"; pic1cap[2] = "HallBar: Optical image of a high sensitivity Hall magnetometer"; // related Caption, if none, leave it blank // photo 2 pic2[0] = "03.jpg"; pic2link[0] = "http://cosmo.nyu.edu/"; pic2cap[0] = ""; // related Caption, if none, leave it blank pic2[1] = "04.jpg"; // image URL pic2link[1] = "http://physics.nyu.edu/csmr/research.html"; // related URL pic2cap[1] = ""; // related Caption, if none, leave it blank pic2[2] = "Potential.jpg"; pic2link[2] = "http://www.physics.nyu.edu/kentlab/"; pic2cap[2] = "Potential: Potential landscape of the magnetization of a molecular nanomagnet--used to understand quantum tunneling of the magnetization"; // related Caption, if none, leave it blank // photo 3 pic3[0] = "05.jpg"; pic3link[0] = "http://physics.nyu.edu/csmr/facilities.html"; pic3cap[0] = ""; // related Caption, if none, leave it blank pic3[1] = "06.jpg"; pic3link[1] = "http://physics.as.nyu.edu/object/GlennysFarrar.html"; pic3cap[1] = "CAS Professor Farrar speaking to undergraduate Physics class"; // related Caption, if none, leave it blank pic3[2] = "vectormagnet.jpg"; pic3link[2] = "http://www.physics.nyu.edu/kentlab/"; pic3cap[2] = "Vector magnet: Superconducting vector magnet used in experimental studies of?quantum tunneling of the magnetization"; // related Caption, if none, leave it blank // photo 4 pic4[0] = "11.jpg"; pic4link[0] = "#"; pic4cap[0] = ""; // related Caption, if none, leave it blank pic4[1] = "12.jpg"; pic4link[1] = "http://www.physics.nyu.edu/kentlab/"; pic4cap[1] = "Array: SEM (scanning electron microscope) image of a nanostencil array used to create submicron magnetic pillars for electron transport experiments."; // related Caption, if none, leave it blank pic4[2] = "MicronWire.jpg"; pic4link[2] = "http://www.physics.nyu.edu/kentlab/"; pic4cap[2] = "Micron wire: Optical image of a micron scale ferromagnetic wire for studies of DW resistivity"; // related Caption, if none, leave it blank // photo 5 pic5[0] = "13.jpg"; pic5link[0] = "http://www.physics.nyu.edu/kentlab/"; pic5cap[0] = "Rings: SEM of magnetic rings designed to study thermally activated magnetization reversal"; // related Caption, if none, leave it blank pic5[1] = "14.jpg"; pic5link[1] = "http://physics.nyu.edu/csmr/facilities.html"; pic5cap[1] = ""; // related Caption, if none, leave it blank pic5[2] = "DWs.jpg"; pic5link[2] = "http://www.physics.nyu.edu/kentlab/"; pic5cap[2] = "DWs: Magnetic force microscopy image of domain walls in a thin ferromagnetic wire"; // related Caption, if none, leave it blank function pickRandom(range) { if (Math.random) return Math.round(Math.random() * (range-1)); else { var now = new Date(); return (now.getTime() / 1000) % range; } } // Write out an IMG tag, using a randomly-chosen image name. var choice1 = pickRandom(ic); var choice2 = pickRandom(ic); var choice3 = pickRandom(ic); var choice4 = pickRandom(ic); var choice5 = pickRandom(ic); document.writeln('
'); document.writeln(''+ pic1cap[choice1]+''+ pic2cap[choice2]+''+ pic3cap[choice3]+''+ pic4cap[choice4]+''+ pic5cap[choice5]+'
');