Factrotation = new Array ("graphics/fact-cc1.gif","graphics/fact-cc2.gif","graphics/fact-cc3.gif","graphics/fact-cc4.gif","graphics/fact-cc5.gif","graphics/fact-cc6.gif")

FactURL = new Array ("http://www.nytimes.com/2006/03/24/science/earth/24melt.html",
"http://cdiac.ornl.gov/pns/current_ghg.html",
"http://www.nytimes.com/2006/03/15/science/earth/15ice.html?ex=1143608400&en=9c006f6f2d5cab14&ei=5070",
"http://www.nytimes.com/2006/03/12/books/review/12zimmer.html?ex=1143608400&en=f6f3fa71c8e479ba&ei=5070",
"http://www.nytimes.com/2006/02/17/science/17climate.html?ex=1143608400&en=728267c2d7762caa&ei=5070",
"http://www.nature.com/nature/journal/v438/n7067/full/438410a.html")


imgCt = Factrotation.length


function chooseFact() {
  if (document.images) {
  randomNum = Math.floor ((Math.random()* imgCt))
  document.fact.src = Factrotation[randomNum]
}
}



function newLocation() {
   document.location.href = FactURL[randomNum]
}



adrotation = new Array ("graphics/ad-conguide.gif", "graphics/ad-econplan.gif")

adURL = new Array ("http://www.nicholas.duke.edu/institute/ccpp/convenientguide/", "http://www.nicholas.duke.edu/institute/carboncosts/")



imgCtAd = adrotation.length




function chooseAd() {
  if (document.images) {
  randomNumAd = Math.floor ((Math.random()* imgCtAd))
  document.ad.src = adrotation[randomNumAd]
}
}


function newLocationAd() {
   document.location.href = adURL[randomNumAd]
}

