
/* ----- randomBanner.js ----- */
/*
	random banner generation
*/

var src=new Array("")
var title=new Array("")
var bgcolor=new Array("")
var link=new Array("")

src[1] = "/banners/banner001.jpg"
title[1] = "Aerial view of the ESRF"
bgcolor[1] = "#000000"
link[1] = ""
src[2] = "/banners/banner002.jpg"
title[2] = "Electric field induced alignment of block copolymer solutions"
bgcolor[2] = "#496ec9"
link[2] = "http://www.esrf.fr/UsersAndScience/Publications/Highlights/2005/SCM/SCM8/"
src[3] = "/banners/banner003.jpg"
title[3] = "Conferences and Workshops at the ESRF "
bgcolor[3] = "#666666"
link[3] = "http://www.esrf.fr/events/conferences/"
src[4] = "/banners/banner004.jpg"
title[4] = "Inside an optics hutch"
bgcolor[4] = "#fec63b"
link[4] = ""
src[5] = "/banners/banner005.jpg"
title[5] = "Microbeam radiation therapy applied to a brain tumour model using X-rays from ESRF beamline ID17"
bgcolor[5] = "#a85c2b"
link[5] = "http://www.esrf.fr/NewsAndEvents/Spotlight/spotlight6_mrt/"
src[6] = "/banners/banner006.jpg"
title[6] = "Conferences and Workshops at the ESRF"
bgcolor[6] = "#666666"
link[6] = "http://www.esrf.fr/events/conferences/"
src[7] = "/banners/banner007.jpg"
title[7] = "External view and virtual extraction of teeth roots from a mandible of the fossil strepsirrhine primate Muangthanhinius siami from Eocene of Thailand. Microtomographic data were obtained on ID19.  Copyright: Marivaux, L., Chaimanee, Y., Tafforeau, P. and Jaeger J-.J."
bgcolor[7] = "#0891f1"
link[7] = "http://www.esrf.fr/UsersAndScience/Publications/Highlights/2006/XIM"
src[8] = "/banners/banner008.jpg"
title[8] = "Aerial view of the ESRF"
bgcolor[8] = "#000000"
link[8] = ""
src[9] = "/banners/banner009.jpg"
title[9] = "A detector at beamline ID11 "
bgcolor[9] = "#000000"
link[9] = ""
src[10] = "/banners/banner010.jpg"
title[10] = "Shimming undulator magnets. Photo copyright AlpImage, 1996."
bgcolor[10] = "#000000"
link[10] = ""
src[11] = "/banners/banner011.jpg"
title[11] = "View into the monochromator vessel of ESRF beamline ID21 for X-ray microscopy. Copyright: P. Ginter, ESRF"
bgcolor[11] = "#a2401d"
link[11] = ""
src[12] = "/banners/banner012.jpg"
title[12] = "X-ray synchrotron microtomography on a gyrogonite from fructification of charophyte algae. Copyright: Paul Tafforeau, ESRF"
bgcolor[12] = "#3a9535"
link[12] = "http://www.esrf.fr/NewsAndEvents/PressReleases/PALEO/"
src[13] = "/banners/banner013.jpg"
title[13] = "X-ray synchrotron microtomography of a fossil sea urchin. Copyrights: P. Tafforeau, ESRF"
bgcolor[13] = "#03767d"
link[13] = ""
src[14] = "/banners/banner014.jpg"
title[14] = "3D rendering of a Devonian phacopsidae trilobite from Marocco. Data were obtained on ID19 with a voxel size of 14.92 micrometres. Copyright: P. Tafforeau, ESRF"
bgcolor[14] = "#1b9c01"
link[14] = ""
src[15] = "/banners/banner015.jpg"
title[15] = "Detail on a beamline"
bgcolor[15] = "#0075cf"
link[15] = ""
src[16] = "/banners/banner016.jpg"
title[16] = "Detail in the booster"
bgcolor[16] = "#363838"
link[16] = ""
src[17] = "/banners/banner017.jpg"
title[17] = "The synchrotron booster ring accelerates electrons to 6 GeV, it is 300 m in circumference"
bgcolor[17] = "#ffffff"
link[17] = "http://www.esrf.fr/Accelerators/Accelerators/Booster"
src[18] = "/banners/banner018.jpg"
title[18] = "The synchrotron booster ring accelerates electrons to 6 GeV, it is 300 m in circumference"
bgcolor[18] = "#c5c968"
link[18] = "http://www.esrf.fr/Accelerators/Accelerators/Booster"
src[19] = "/banners/banner019.jpg"
title[19] = "Scanning X-ray microspectroscopy images of wood from the Mary Rose shows two distinct layers of thiols in the lignin-reinforced wall of a vessel. Copyright: F. Jalilehvand."
bgcolor[19] = "#265920"
link[19] = "http://www.esrf.fr/UsersAndScience/Publications/Highlights/2005/Imaging/XIO10/"
src[20] = "/banners/banner020.jpg"
title[20] = "3D rendering of a Cretaceous beetle from France embedded in opaque amber. The scan was done on ID19 with moderate propagation phase contrast. Copyright: P. Tafforeau, ESRF"
bgcolor[20] = "#243b6f"
link[20] = "http://www.esrf.fr/files/Newsletter/NL42.pdf"
src[21] = "/banners/banner021.jpg"
title[21] = "The Linac or pre-injector, a linear electron accelerator "
bgcolor[21] = "#42c8cb"
link[21] = "http://www.esrf.fr/Accelerators/Accelerators/Pre-injector"
src[22] = "/banners/banner022.jpg"
title[22] = "Removing the storage ring roof in the experimental hall. Copyright: P. Ginter, ESRF"
bgcolor[22] = "#f9f9bb"
link[22] = ""
src[23] = "/banners/banner023.jpg"
title[23] = "Getting around in the experimental hall"
bgcolor[23] = "#c7ec83"
link[23] = ""
src[24] = "/banners/banner024.jpg"
title[24] = "Fluorescence image showing metal ion content in trichomes from the plant Arabidopsis thaliana, taken on beamline ID21. Copyright: M.-P. Isaure, B. Fayard, G. Sarret, S. Pairis, J. Bourguignon"
bgcolor[24] = "#021758"
link[24] = "http://www.esrf.fr/UsersAndScience/Publications/Highlights/2005/Imaging/"
src[25] = "/banners/banner025.jpg"
title[25] = "3D rendition of a  flip-chip bonded device by  synchrotron radiation computed laminography on beamline ID19 "
bgcolor[25] = "#05084b"
link[25] = "http://www.esrf.fr/UsersAndScience/Publications/Highlights/2005/Imaging/XIO3/"
src[26] = "/banners/banner026.jpg"
title[26] = "Small-angle X-ray diffraction from photonic colloidal crystals "
bgcolor[26] = "#5987ff"
link[26] = "http://www.esrf.fr/UsersAndScience/Publications/Highlights/2005/SCM/SCM10/"
src[27] = "/banners/banner027.jpg"
title[27] = "STM image of the PTCDA/Ag(111) interface"
bgcolor[27] = "#476cbc"
link[27] = "http://www.esrf.fr/UsersAndScience/Publications/Highlights/2005/SIS/SIS6/"
src[28] = "/banners/banner028.jpg"
title[28] = "Microspectroscopy of sulfur helps conservation of Henry VIIIs warship Mary Rose. Copyright: F. Jalilehvand."
bgcolor[28] = "#3a5197"
link[28] = "http://www.esrf.fr/UsersAndScience/Publications/Highlights/2005/Imaging/XIO10/"
src[29] = "/banners/banner029.jpg"
title[29] = "The Structure of tryptophan 7-halogenase (PrnA) studied at beamlines BM14 and ID14-1"
bgcolor[29] = "#a3b3ef"
link[29] = "http://www.esrf.fr/UsersAndScience/Publications/Highlights/2005/SB/SB7/"
src[30] = "/banners/banner030.jpg"
title[30] = "Grain nucleation and growth kinetics during solidification of an aluminium alloy studied at ESRF beamline ID11"
bgcolor[30] = "#010082"
link[30] = "http://www.esrf.fr/UsersAndScience/Publications/Highlights/2005/Materials/MAT8/"
src[31] = "/banners/banner031.jpg"
title[31] = "X-ray microtomograph imaging of deployment of a cardiovascular stent on ESRF beamline BM05 "
bgcolor[31] = "#8e8e8e"
link[31] = "http://www.esrf.fr/NewsAndEvents/Spotlight/spotlight28stent/"
src[32] = "/banners/banner032.jpg"
title[32] = "Experimental apparatus under ultra-high vacuum on ESRF beamline ID08 for the study of magnetism and electronic structures.  Copyright: P. Ginter, ESRF"
bgcolor[32] = "#ff9933"
link[32] = ""
src[33] = "/banners/banner033.jpg"
title[33] = "High-temperature extraction of vanadium from vanadiferous titanomagnetite for oxidation state determination at ID26"
bgcolor[33] = "#feb727"
link[33] = "http://www.esrf.fr/UsersAndScience/Publications/Highlights/2005/HRRS/HRRS15/"
src[34] = "/banners/banner034.jpg"
title[34] = "Photosystem II at 3.0 angstrom resolution"
bgcolor[34] = "#7292c3"
link[34] = "http://www.esrf.fr/NewsAndEvents/Spotlight/spotlight31/"
src[35] = "/banners/banner035.jpg"
title[35] = "The storage ring maintains a 6 GeV electron beam"
bgcolor[35] = "#303030"
link[35] = "http://www.esrf.fr/Accelerators/Accelerators/StorageRing"
src[36] = "/banners/banner036.jpg"
title[36] = "2D coherent diffraction pattern measured on a 1.5 micrometre-sized Au single crystal taken at ESRF beamline ID01"
bgcolor[36] = "#d50304"
link[36] = "http://www.esrf.fr/NewsAndEvents/Spotlight/spotlight4_gold/"
src[37] = "/banners/banner037.jpg"
title[37] = "STM image of the SrTiO3(103) vicinal surface performed in the Surface Characterisation Laboratory of ID32"
bgcolor[37] = "#eba148"
link[37] = "http://www.esrf.fr/NewsAndEvents/Spotlight/spotlight21steps/"
src[38] = "/banners/banner038.jpg"
title[38] = "Radio frequency cavities for electron beam acceleration in the booster synchrotron"
bgcolor[38] = "#de5c04"
link[38] = ""
src[39] = "/banners/banner039.jpg"
title[39] = "Radio frequency cavity for electron beam acceleration in the booster synchrotron. Copyright: P. Ginter, ESRF"
bgcolor[39] = "#bfe5f2"
link[39] = ""
src[40] = "/banners/banner040.jpg"
title[40] = "Ice forming on cooling system of beamline components"
bgcolor[40] = "#000000"
link[40] = ""
src[41] = "/banners/banner041.jpg"
title[41] = "Langmuir trough for studying liquid/liquid interface at ID10b"
bgcolor[41] = "#276a23"
link[41] = "http://www.esrf.fr/NewsAndEvents/Spotlight/spotlight17interfaces/"
src[42] = "/banners/banner042.jpg"
title[42] = "Split coil superconducting magnet installed on ID20"
bgcolor[42] = "#ffff2b"
link[42] = "http://www.esrf.fr/NewsAndEvents/Spotlight/spotlight32rxs/"
src[43] = "/banners/banner043.jpg"
title[43] = "3D rendering of a Devonian phacopsidae trilobite from Marocco. Data were obtained on ID19 with a voxel size of 14.92 micrometres. Copyright: P. Tafforeau, ESRF"
bgcolor[43] = "#00a39e"
link[43] = ""
src[44] = "/banners/banner044.jpg"
title[44] = "Instrumentation on beamline ID28"
bgcolor[44] = "#6d6a65"
link[44] = ""
src[45] = "/banners/banner045.jpg"
title[45] = "X-ray absorption and magnetic scattering discussion at beamline ID08. Copyright: P. Ginter, ESRF"
bgcolor[45] = "#acecfe"
link[45] = ""
src[46] = "/banners/banner046.jpg"
title[46] = "Path of the infrared beam to the IR end-station (microscope) on beamline ID21"
bgcolor[46] = "#d1d2c2"
link[46] = ""
src[47] = "/banners/banner047.jpg"
title[47] = "SEM image of colloidal bct crystal, investigated at beamlines ID10A TROÏKA and BM26 DUBBLE. "
bgcolor[47] = "#219f0d"
link[47] = "http://www.esrf.fr/UsersAndScience/Publications/Highlights/2005/SCM/SCM10/"
src[48] = "/banners/banner048.jpg"
title[48] = "3D rendering of a Jurassic juvenile ammonite from France. Microtomographic data were collected at beamline ID19, with a 7.5 micrometre pixel size. Copyright: P. Tafforeau, ESRF"
bgcolor[48] = "#1b9c01"
link[48] = ""
src[49] = "/banners/banner049.jpg"
title[49] = " Movable detector at beamline ID02 for small-angle scattering studies. Copyright: P. Ginter, ESRF"
bgcolor[49] = "#19ba8e"
link[49] = ""
src[50] = "/banners/banner050.jpg"
title[50] = "Sample stage on ESRF beamline ID23 for protein crystallography.  Copyright: P. Ginter, ESRF"
bgcolor[50] = "#000c8e"
link[50] = ""
src[51] = "/banners/banner051.jpg"
title[51] = "View of the ESRF at night. Copyright: P. Ginter, ESRF"
bgcolor[51] = "#000000"
link[51] = ""
src[52] = "/banners/banner052.jpg"
title[52] = "Working in an experimental hutch at beamline BM25. Copyright: P. Ginter, ESRF"
bgcolor[52] = "#ecd0b8"
link[52] = ""



function randomBanner() {
  rand1=Math.floor(Math.random()*10)

  switch (rand1)
  {
  case 0:
    document.write('<td id="banner-cell" bgcolor="#cce0f5"><a href="http://www.esrf.fr/AboutUs/Upgrade"><img src="http://www.esrf.fr/banners/banner053.jpg" alt="The ESRF Upgrade Programme" title="The ESRF Upgrade Programme" border="0"></a></td>')
    break
  case 1:
    document.write('<td id="banner-cell" bgcolor="#f4b8fb"><a href="http://www.esrf.fr/AboutUs/Upgrade"><img src="http://www.esrf.fr/banners/banner054.jpg" alt="The ESRF Upgrade Programme" title="The ESRF Upgrade Programme" border="0"></a></td>')
    break   
  case 2:
  case 3:
  case 4:
  case 5:
    document.write('<td id="banner-cell" bgcolor="#754276"><a href="http://www.esrf.fr/AboutUs/Upgrade/purple-book/"><img src="http://www.esrf.fr/banners/banner055.jpg" alt="ESRF Science and Technology Programme 2008 - 2017" title="ESRF Science and Technology Programme 2008 - 2017" border="0"></a></td>')
    break
  default:
    rand2=Math.floor(Math.random()*52) + 1
    if (link[rand2] != '')
    {
    document.write('<td id="banner-cell" bgcolor="'+bgcolor[rand2]+'"><a href="'+link[rand2]+'"><img src="'+src[rand2]+'" alt="'+title[rand2]+ '" title="'+title[rand2]+'" border="0"></a></td>')
    }
    else
    {
    document.write('<td id="banner-cell" bgcolor="'+bgcolor[rand2]+'"><img src="'+src[rand2]+'" alt="'+title[rand2]+ '" title="'+title[rand2]+'" border="0"></td>')
    }    
  }
}

