/* random images for Spotlight */
function rand ( n )
{
  return ( Math.floor ( Math.random ( ) * n + 1 ) );
}
var itemnumber = 8;
var rand1 = rand(itemnumber);
var rand2 = rand(itemnumber);

if (rand1 == rand2){
	 if(rand1 == 1){ rand2 = 2; }
	 else if(rand1 == itemnumber){rand2 = itemnumber-1;}
	 else rand2 = rand1+1;
}

links = new Array
links[1] = "https://circle.ubc.ca/"
links[2] = "http://www.library.ubc.ca/home/UBC_RS_07-08_fa.pdf"
links[3] = "http://www.ikebarberlearningcentre.ubc.ca/"
links[4] = "http://www.library.ubc.ca/libqual/"
links[5] = "http://toby.library.ubc.ca/news/librarydetail.cfm?id=362"
links[6] = "http://www.supportubclibrary.ca/newsletters/UBC-Friends_Summer-09_FINAL.pdf"
links[7] = "http://www.library.ubc.ca/home/energy.html"
links[8] = "http://www.library.ubc.ca/labs"

var link1 = links[rand1]
var link2 = links[rand2]

var quotations=new Array
quotations[1] = "cIRcle: UBC's Information Repository";
quotations[2] = "2007-2008 Report of the University Librarian to the Senate (PDF)";
quotations[3] = "Irving K. Barber Learning Centre";
quotations[4] = "LibQUAL+&reg; 2009 @ UBC Library";
quotations[5] = "Access to New Content in the Human and Social Sciences";
quotations[6] = "Friends newsletter (PDF)";
quotations[7] = "Kill A Watt: How you can modify your use of technology and energy";
quotations[8] = "UBC Library Labs";
var quotation1 = quotations[rand1]
var quotation2 = quotations[rand2]

document.write(
	'<li><a href="' + link1 + '">' + quotation1 + '</a></li>'+
	'<li><a href="' + link2 + '">' + quotation2 + '</a></li>'
);

